texts: Correct way to extract pixel data using GDAL. Current method gives repeated but changing value.

texts:
I am trying to open a spectral file and move bands of data from GDAL to OpenCV's Mat data structures. As of now I am just trying to make sure that I can correctly access each band using GDAL and pull the pixel data.

So I want to explain what I think the following code is doing and if I am wrong(must be) then please correct me. It opens the file and loads the dataset. Then I get raster band 1 assigned to currentBand. The float pointer is then made to point at enough memory for one line of pixel data. RasterIO gets this data and places it in the newly allocated space. I then traverse the array printing the value that has been placed in each element.
(Code in c++)

GDALDataset  *dataset;
GDALRasterBand *currentBand;
int blockXSize, blockYSize;
GDALAllRegister();
dataset = (GDALDataset *) GDALOpen( specImag->filename.c_str(), GA_ReadOnly );

currentBand = dataset->GetRasterBand(1);
currentBand->GetBlockSize(&blockXSize, &blockYSize);

float *fScanline;
fScanline = (float *) CPLMalloc(sizeof(float)*specImag->widthx);

currentBand->RasterIO( GF_Read, 0, 0, specImag->widthx, 1,
                          fScanline, specImag->widthx, 1, GDT_Float32, 0, 0 );

for(int i=0; i<specImag->widthx; i++){
        std::cout << "Data Point ";
        printf("%d", i);
        std::cout << " is: ";
        printf("%d", fScanline[i]);
        std::cout << std::endl;
    }

(the code is not complete and will not run as is)

When I run the code I get the same number (ex. 421076 or 4210432) for every element in the array. If I wait a little bit and run the program again I get a different number than the prevous run but still the same in each element.

What am i missing when it comes to accessing the pixel/data in each band?


texts: Dissolve shapefile polygons on SQL Management Studio 18

texts:
This is the first time I am trying to work with a shapefile on SQL and I am a little lost.
I uploaded a shapefile with all the counties of the US and what I am trying to do is  to dissolve all counties within California.
After a lot of research I though I could use UnionAggregate but when I try to run the query I get an error:
Msg 206, Level 16, State 2, Line 1
Operand type clash: geometry is incompatible with geography.

Any suggestions?
My code:
select statefp,geography::UnionAggregate(geom)
from tl_2017_us_county
where statefp=6


texts: What is the best format to encode polygons such as lakes?

texts:
I am looking for a standard format to encode polygons, such as lakes, in one file that is easy to create and common so that others can use it in different GIS systems. Every file will contain data on only one type of polygons such as lakes.
One friend suggested GML format but I can't really decide because I have no background in this area. Thanks.


texts: Spatialite Spatial Views doesn't display in QGIS

texts:
I have views stored in a spatialite database accessed via QGIS. The views were created by another person on a different computer. The geometry column is well registered in the table views_geometry_columns but when  I add the view to the canvas with DB Manager It's seems to just be an attribute table without geometry.
I've tried the classical SELECT UpdateLayerStatistics('view_name') but it doesn't change anything.

Any solution(s) ?


texts: How can I download data from an FTP server using python?

texts:
I am trying to download precipitation data from an ftp server. The code that I am using is this, but am still getting errors.

import urllib2
urlretrieve("http://ftp.cpc.ncep.noaa.gov/fews/fewsdata/africa/arc2/geotiff/", "folder link")


texts: How to determine aerosol model value for i.atcorr in GRASS?

texts:
The i.atcorr module in GRASS requires aerosol model data to perform atmospheric correction using the 6S algorithm.

It seems like I need a value from one of these parameters to continue:

Estimate of the meteorological parameter visibility v [km], or
The aerosol optical depth (AOD) at 550nm

Is there an easy (and free) way to get such data?

**EDIT (new findings):

It seems that a NASA website called Space-Based Measurements of Ozone and Air Quality in the Ultraviolet and Visible got the free aerosol model data. It is organized by date and by the instruments that collected the data. Basically:

OMI (Ozone Monitoring Instrument) is for data dated July 2004 onward
TOMS Earth Probe is for data dated 7/25/96 - 12/31/05
TOMS Nimbus-7 is for data dated 11/1/78 - 5/6/93

I'm processing a Landsat scene dated in year 2000-2001, so Toms Earth Probe data is the way to go. But as stated by @Tobi in an answer below, TOMS Earth Probe data is actually an index, and unitless (not really AOD at 550nm which I want in the 6S algorithm).

But I've stumbled upon this called A Long-Term Record of Aerosol Optical Depth from TOMS Observations and Comparison to AERONET Measurements, and they hinted how the data in TOMS observation can still be used.

I need more time to learn how to do this. Welcome any further input, always..


texts: Convert the geometry column of a GeoDataFrame with mixed geometry types to a unique multi-type

texts:
I have a GeoDataFrame where I have a mix of geometry types in its geometry column, some are multi-geometry types, some are single geometry types, some are empty geometry types, and others are None (rare).
Let's dive into it by generating an example:
from shapely.geometry import Point, Polygon, MultiPoint
import geopandas as gpd

poly = Polygon([(-1, -1), (-1, 2), (2, 2), (2, -1), (-1, -1)])
multipoint = MultiPoint([Point(0, 0), Point(1, 1)])
point = Point(0,1)
point_ = Point(10,10)
empty_point = Point()
none_point = Point()

gdf = gpd.GeoDataFrame(geometry=[
    multipoint,
    point,
    point_,
    empty_point,
    none_point
])

 # To generate a POINT EMPTY:
gdf['geometry'] = gdf['geometry'].apply(lambda x: x.intersection(poly) )
gdf['geometry'].loc[4] = None # special None case

Which results in:

How to enforce the geometry column type to MultiPoint everywhere?
Some use cases (non exhaustive) are;

the call to the .plot() method on this GeoDataFrame. As it stands, it throws; AttributeError: 'NoneType' object has no attribute 'type'.
to write these data to a PostGIS table where the field type is already a Geometry(MultiPoint).

Based on this, I've tried the following without success:
gdf["geometry"] = [MultiPoint([x]) if \
    type(x)==Point or type(x)==None or 'empty' in str(type(x)).lower() \
    else x for x in gdf["geometry"]]

Returns: EmptyPartError: Can't create MultiPoint with empty component
EDIT:
To fully answer the first relevant comment below; as there actually is a POINT EMPTY in the shown example, I expect there should also be a MULTIPOINT EMPTY, acting as a placeholder saying that a MultiPoint instance is created, but that it doesn't hold any information, like the POINT EMPTY resulting from the intersection operation does.
This would make the whole series suited for writing to a Geometry(MultiPoint) column in PostGIS and would make it possible to plot the series when some of the multipoints are occasionally empty. This logical reasoning could as well be applied to all types of geometry, of course.
EDIT bis:
I've run some extra tests with PostGIS:

Run this SQL:

CREATE TABLE test_multipoints (
    id SERIAL PRIMARY KEY,
    name VARCHAR(64),
    geometry Geometry(POINT,4326)
  );

INSERT INTO test_multipoints (name, geometry)
     VALUES ('point', 'SRID=4326;POINT(1 0)');
INSERT INTO test_multipoints (name, geometry)
     VALUES ('empty_point', 'SRID=4326;POINT(1 0)');

UPDATE test_multipoints
   SET geometry = null -- dropping to have an empty cell for comparison
 WHERE id=2;

From Python run this code:

import psycopg2
import geopandas as gpd
from shapely.geometry import MultiPoint, Point

params = {
   'user': 'postgres',
   'password': 'yourpassword',
   'host': 'localhost',
   'port': '5432',
   'dbname': 'postgres'
}

with psycopg2.connect(**params) as conn:
    sql = "SELECT id, name, geometry FROM test_multipoints;"
    gdf = gpd.read_postgis(sql, conn, geom_col='geometry', crs=4326)

Now check what's inside your GeoDataFrame:
>>> gdf
   id         name                 geometry
0   1        point  POINT (1.00000 1.00000)
1   2  empty_point                     None

And promote it to multi using the previously described command:
>>> gdf['geometry'] = [MultiPoint([x]) if type(x)==Point \
                                       else x for x in gdf['geometry']]
>>> gdf2
   id         name                      geometry
0   1        point  MULTIPOINT (1.00000 1.00000)
1   2  empty_point                          None

So, maybe, GeoPandas should stick with the None type when there is no result for an operation? Because when there is an actual empty component, it throws this EmptyPartError.


texts: How to export column values for input into contour List using modelbuilder

texts:
I am relatively new to modelbuilder and I need some help with attribute querying and exporting.

I am using modelbuilder in arcgis 10.2 and I need to find out if there is a way of exporting the values within a specific column of a layers attribute table for subsequent input into the contour list tool in arcgis?


texts: Is it possible to run PDAL without Conda?

texts:
PDAL looks like a fantastic library but for some reason when I install Anaconda, it breaks a bunch of dependencies\paths.  Is it possible to use PDAL without having Anaconda (Miniconda) installed? If so, can you outline the steps?  This is where I am getting my steps now - Windows 10 It may be stemming from the "Register Anaconda as your default Python" checkbox.  I would rather not do that.
UPDATE
Things are working well in the OSGEO4Shell and I was able to run a pipeline with
pdal pipeline testpipe1.json

{
    "pipeline":[
     {
        "type":"readers.las",
        "filename":"F:\\MP02-MP25\\LAS\\XXX5_RGB(1564).las"
      },
      {
        "type":"filters.crop",
        "a_srs": "EPSG:4326",
        "polygon":"POLYGON ((
              -90.28151392936705 38.64088326179908,
              -90.28208792209625 38.64059415029273,
              -90.2816641330719 38.64016257587423,
              -90.28008699417114 38.640112295190406,
              -90.27978658676147 38.64051453967314,
              -90.28035521507263 38.640879071785584,
              -90.28151392936705 38.64088326179908
              ))"
      },
      {
        "type":"writers.las",
        "a_srs": "EPSG:4326",
        "filename":"F:\\MP02-MP25\\LAS\\XXX5_RGB(1564)T.las"
      }
    ]
  }


texts: Applying filter expression on custom made plugin in QGIS 2.18?

texts:
I am developing a plug-in for QGIS 2.18 on Python but unable to find anywhere that how can I apply a filter expression on a layer in the .py file of plug-in?

For example, "fclass" = 'bank'  AND "name" = 'xyz bank'

    def run(self):
    """Run method that performs all the real work"""
    layers = self.iface.legendInterface().layers()
    # layer_list = []
    # for layer in layers:
    #     layer_list.append(layer.name())

    layer = layer_pois2
    layer.setSubsetString('"fclass" = "bank"  AND "name" = "meezan bank"')


texts: Converting arcpy.da script to arcpy.SearchCursor?

texts:
I am trying to learn python for ArcGIS.

Currently on this tutorial exercise:

https://www.e-education.psu.edu/geog485/node/191

 import arcpy
featureClass = r"C:\Users\A\Desktop\ARC\USA.gdb\StateBoundaries"
state = "Wyoming"
field = "NAME"
item = ""
try:
    arcpy.MakeFeatureLayer_management(featureClass, "USALayer")
    arcpy.MakeFeatureLayer_management(featureClass,
                                      "SelectionLayer",
                                      '"' + str(field) + '" =' + "'" + str(state) + "'")
    arcpy.SelectLayerByLocation_management("USALayer","BOUNDARY_TOUCHES","SelectionLayer")

    rows = arcpy.SearchCursor(USALayer,"","",field)
    for row in rows:
        if item != row.NAME:
            item = row.NAME
        print item

except:
    print arcpy.GetMessages()

arcpy.Delete_management("USALayer")
arcpy.Delete_management("SelectionLayer")

I am getting following message:

  Executing: SelectLayerByLocation USALayer BOUNDARY_TOUCHES SelectionLayer # NEW_SELECTION
  Start Time: Wed Feb 28 11:15:49 2018
  Succeeded at Wed Feb 28 11:15:49 2018 (Elapsed Time: 0.00 seconds)

I think I am making mistake in converting arcpy.da.SearchCursor code that tutorial uses to arcpy.SearchCursor since  SelectLayberByLocation is executing successfully but I am unable to print items in 'NAME' variable.

Using ArcGIS 10.0, hence need to change code.


texts: Filtering a layer with attribute value from another layer in Qgis 2.18

texts:
I am pretty new to Qgis and a real beginner when it comes to working with
expressions in Qgis. Maybe someone can help me with following problem:

I have several Layers (like Building + House) and each of them have specific attributes values that i want to filter. So my idea was to get an extra layer Test with the attribute value that i want to filter on the other layers and put a filter expression to the attribute value A in table category_1 of layer Test. Basically to avoid rewriting the filters for each layer all the time. But I dont know how to get it done.
I tried it with get_feature and attribute() but in my Qgis 2.18 there is no help how such expressions have to look like. That makes it really hard if u have no clue.
So how can I filter with the attribute value A in category_1 of layer the Test in the layer House ?


texts: Web AppBuilder for ArcGIS/ArcGIS Online web app issues

texts:
I have created a a few web apps through ArcGIS Online and although I have shared each with "Everyone (public)", the URL I sent to a colleague brings up the ArcGIS Online sign in page. It seems as if the functionality of sharing apps has changed since the last time I visited our AGOL site. For instance, I no longer see the option to "embed" a map.

Here is an example of the url:

http://uncw.maps.arcgis.com/apps/OnePane/basicviewer/...

Here is the example from a test app created with AppBuilder:

/apps/webappviewer/index.html?...

Does anyone know why I cannot create a valid URL (that does not require a log in) from my shared ArcGIS Online web apps?


texts: How can I transform geometry data to bounds?

texts: My SRID is 3137 and I want to transform geometry data(e.q : "0101000000904160258CC91841C8073D6723545141") to bounds. I need to bounds coordinates for use in maxExtend() function. Help me please!


texts: ArcGIS Web AppBuilder Query Widget acts strangely on Android?

texts:
I am viewing an ArcGIS Online Web AppBuilder app on an Android. I have a Query Widget which searches an address string to locate a parcel. When setting up the Query Widget, I selected "Ask for values." For the expression, I left the value blank and selected "Unique" so as to obtain a list of all of the unique values.

The app works well on desktop, but when viewed on both an Android and IPad, the Query has a couple of issues:

It is not acting responsively. The input screen hovers to the right of the device screen and is only half visible. The full screen mode does work responsively, though.
When I type in a character in the "specify parameters for this task" box, the first value in my list that has the character automatically prefills rather than providing me with a list of the records that match my character (as it does when viewed on a desktop). I can backspace so only that character is in the box and the list of available options appear.

Any suggestions?


texts: Geopandas Proj4 reproject to global equal area projection

texts:
I have a geoDataFrame with crs {'init': 'epsg:4326'} The data has a global extent and my goal is to calculate the area (in m2) per feature. Therefore I want to reproject the geoDataFrame using the

gdf.to_crs({'init':'epsg:xxxx'})

method. I looked into suitable global equal area projections and found Eckert IV. However I cannot find an EPSG code for this projection. Is there a way to

use an ESRI code in geopandas (proj4 under the hood) e.g. ESRI:54012 ? or should I
use another global equal area projection crs for which an epsg is available.

EDIT: using the proj4 definition string works. Make sure you click proj4 and not just copy the definition on top. (without the +ellps=WGS84 part).
Notebook


texts: Where can I find the format specification for LSLIFF data?

texts:
I have an LSLIFF file which should contain some map contour data, and I want to write a renderer for it, but to do that I need to understand the file format. A preliminary search has not turned up anything useful.

At first glance my LSLIFF file appears to be some header data followed by some blocks of data (start of block, pairs of points, end of block) followed by footer data, all stored in ASCII.

What is an LSLIFF file and where can I find the format specification for it?

The start and end of my file:

RA    1252000.0000   1276000.0000   5010000.0000   5046000.0000
HI
NS Map sheet CB11 v1-03 created by Translate in Pre-press
NO 1
NF 1 1
FS 26 0 0 0
AC 1021 600.000000
AC 1023 0 ""
AC 1024 0 ""
ST 200 0
1254641.6843 5046000.0000
1254638.9556 5045998.1010

... many more pairs of floating point numbers ...

1271576.5132 5045999.3642
1271575.6188 5046000.0000
EF
NF 12343 12343
FS 26 0 0 0
AC 1021 1500.000000
AC 1023 0 ""
AC 1024 0 ""
ST 5 0
1271618.1602 5046000.0000
1271631.8940 5045958.3569
1271651.0208 5045945.9561
1271663.2206 5045965.9839
1271673.8981 5046000.0000
EF
EO
EM
EJ


texts: OpenLayers Vector Layer callback does not execute with GeoJSON

texts:
Why does this callback get ignored:

new OpenLayers.Layer.Vector("My layer",
      {
        projection : "EPSG:4326",
        strategies : [ new OpenLayers.Strategy.Fixed(), refreshStrategy ],

        protocol : new OpenLayers.Protocol.HTTP(
        {
          url    : "myphpurl.php",
          params : { rand : Math.random() * 1000 },
          format : new OpenLayers.Format.GeoJSON(),
          callback: function(){alert('test');}
        }),

I'm trying to get access to how many features were returned...


texts: PyQgis save geojson with features of different number of properties

texts: I have a stand alone pyqgis application that can load vector map layers. I want to export all of the map layers into a single geojson file. I can do it by creating an all-included QgsVectorLayer, then uses the QgsVectorFileWriter.writeAsVectorFormat() method to output that layer to one geojson file. The problem with this approach is that all features have to have the SAME number of properties/attributes, otherwise you can't keep adding new features into the layer. GeoJson can have features that have different number of properties, and I would like to take advantage of that, but I don't know how to generate a collection of features with different number of properties to be exported into a single geojson file. I would prefer to stay with PyQgis utilities and not import additional libraries, but if I have to, I would like to know as well.


texts: Connecting survey vessel points with lines on ArcGIS Online

texts:
I am collecting vessels historical points on ArcGIS Online, these are received as csv from the web, based on an API call., but I would like to be able to connect the dots, anytime I retrieve these points automatically.

I there any way I can do this, or via a geoprocessing toolbox that knows when a new csv is added to the web map?


texts: plugin builder problem with compiling(probaly)

texts:
I m trying to make a new plugin with the use of plugin builder. But i stumbeled across a problem when following this tutorial. I get stuck on the point that i have to compile the plugin.

With the use of OSGeoW shell i used this code in my plugin directory:

pyrcc4 -o resources.py resources.qrc

There is no message in the shell that the command is executed.
In QGIS i can see in my "manage and install plugins" screen that qgis know that my plugin is there but gives the error that the syntax is false. See image

I didn't change anything in the plugin files. I m curently using qgis 2.14.3 and a Windows.


texts: ArcGIS Pro: Make NetCDF Raster Layer, with lon/lat stored in variables

texts:
I have a netCDF file with dimensions 'xi' and 'eta', one-dimensional variables 'lon' and 'lat' that provide the coordinates for each grid point, and two-dimensional variables for 'SST' and 'salinity'. I am hoping to use ArcGIS Pro's "Make NetCDF Raster Layer" tool, but there is no way to associate the values stored in 'lon' and 'lat' with the dimensions 'xi' and 'eta'.
I think I may be having a similar problem to Importing NetCDF file to ArcGIS Desktop as point feature layer?, but I wasn't able to understand their explanation of how to get ArcGIS to recognize my 'lon' and 'lat' variables as coordinate variables.
My end goal is to convert the data to a ASCII raster file.


texts: ArcGIS Pro 2.5 - Calculate sum of a field in Arcade

texts:
I am using ArcGIS Pro 2.5 and I am trying to calculate the sum of a field in Arcade. I used
Sum($layer, "Population")

However when verifying I get the message that "Object Not Found $layer". I am wondering if the global $layer is available in ArcGIS Pro 2.5?


texts: Converting Angles in a File Geodatabase Table - via Field Calculator's Python

texts:
In a file geodatabase table, I have an attribute called 'NEAR_ANGLE' created via the "Generate Near Table" tool that I'd like to convert to a 0-360 degrees format. I've created an attribute called 'Angle_360' in order to store the converted angles. Both these attributes have double as data type.

Regarding the current angle format - I selected the Geodesic method for running the "Generate Near Table" tool, and here's what the tool help states in ArcMap regarding its angle format:

When the Geodesic method is used, the angle is within the range of -180° to 180°, with 0° to the north, 90° to the east, 180° (or -180°) to the south, and -90° to the west.

I tried doing the conversion by using a Python script in "Field Calculator" for the 'Angle_360' attribute, but I've been unsuccessful. I'm an absolute beginner in ArcPy/Python, so I'm pretty sure I have huge syntax errors. Below is what I have so far:

Pre-Logic Script Code:

    def Calculate(NearAngle):
 if ( [NEAR_ANGLE] < 0 and [NEAR_ANGLE] > -180):
   [NEAR_ANGLE] = [NEAR_ANGLE] +360
   return [NEAR_ANGLE]
 else:
   return [NEAR_ANGLE]

Angle_360 =
Calculate(!NEAR_ANGLE!)

Error messages are below:

ERROR 000539: Error running expression: Calculate(153.979921739005)
Traceback (most recent call last):
File "< expression >", line `, in < module >
File "< string >", line 2, in Calculate
UnboundLocalError: local variable 'NEAR_ANGLE' referenced before assignment
Failed to execute (CalculateField).
Failed at Sun Apr 22 12:47:12 2018 (Elapsed Time: 0.13 seconds)


texts: Fixing a raster with unknown spatial reference so other rasters show up

texts:
I am trying to create a dataset with data from different raster datasets in ArcMap. One of the raster datasets seems to have an "unknown spatial reference", and it shows "unknown" as XY coordinate system.

I tried assigning it a coordinate system, which didn't work for reasons that might be obvious to others. When I try to import a raster that does not have such problems together with the unreferenced one, it is listed in the Table of Contents but it does not show up as a map.

What exactly is wrong here, and how can I fix the raster with the unknown spatial reference?


texts: Search Raster Files from Folder that Have Same Spatial Coordinates Using Python

texts: I have approximately 700 raster files in a single folder and I need to find files that have the same spatial extent and copy to a different folder. The raster files measure daily snow cover and therefore have the exact same spatial extent.


texts: Calculating total shared boundary between polygons based on their attributes?

texts:
I tried to do this over the weekend but had no luck - even after searching this forum. I'm trying to calculate the frontage (length of the property bordering the street) of a number of properties. I've got a shapefile of Hobart, Australia which I've slimmed down for this question as below.

Private Parcel = Houses

Casement = Streets

#Download and unzip the file from https://drive.google.com/open?id=18yyrDSFz2jp0N3R0ehs80leVs9Qyv1wy
#libraries
library(tmap)
library(rgdal)
#Import
example <- readOGR(dsn="Example GIS",layer="Example")
#Visualise the data
tm_shape(example) + tm_polygons("CAD_TYPE1")
#I want to calculate the total length of each 'Private Parcel' polygon shared border with 'Casement'. I don't know how to do this.

Can anyone tell me how I might be able to do this?

After reading @Spacedman’s comment I noticed that some properties are aggregating.

#Previous Code
library(rgeos)
library(rgdal)
example <- readOGR(#File Location)
houses = example[example$CAD_TYPE1 == "Private Parcel",]
streets = example[example$CAD_TYPE1 == "Casement",]
frontages = gIntersection(houses, streets,byid=c(TRUE,FALSE))
length(frontages)
dim(houses)
plot(houses[12,])
plot(frontages[12],add=TRUE,lwd=4,col="red")
houses$frontage = gLength(frontages, byid=TRUE)

#My test
plot(houses)
plot(frontages,add=TRUE,lwd=4,col=houses@data$frontage)
#As you can see, the frontages are being aggregated between some properties.

#Here's my 2nd attempt
library(tidyverse)
library(sf)
example  = read_sf("Example GIS/Example.shp")
roads <- example[example$CAD_TYPE1=="Casement",]
house <- example[example$CAD_TYPE1=="Private Parcel",]
# intersection
int = st_intersection(house,roads)
# find out about the length of each line segment
int$len = st_length(int)
#Plot
ggplot(data=house) + geom_sf(fill=house$CID,alpha=0.5,col=NA) + geom_sf_label(aes(label=CID),size=2) + geom_sf(data=int,col=int$CID,size=2)

Two properties are still aggregating - 1271016 and 1271014.


texts:
Our arcgis server just got updated to 10.1. All the configurations are done and it is now running properly. But we still need to restrict explicit access to the REST services and only localhost(127.0.0.1) to have access to the REST services.

We have done it in 9.3 by adding an allow entry for localhost on the ArcGIS web app in IIS under the IP Address and Domain Restrictions. Also we set the Feature settings to deny all unspecified clients.

We did the same thing to 10.1 but we can still make explicit calls to the arcgis REST services through other PC.

Any ideas?

thanks!


texts: Create multiple random points based on attributes from a different shapefile

texts:
I have two shapefiles, one (Polygon A) is a fishnet of 1 square kilometer polygons, and the second (polygon B) is a multiple polygon with specific attributes. One of the attribute is the total number of objects.

I came up with a scoring system for the fishnet and only a subset of the fishnet-polygons remains. What I would like to do is to generate X number of random points to the polygon A that fall within a section of polygon B. The # X is the attribute of the section of polygon B. Any suggestions?


texts: Determining longest length of segmented polylines representing rivers?

texts:
I have a series of shapefiles using polylines to represent the hydro network of a region. As you can see in the picture, these polylines go into great detail. These polylines are very segmented even though it seems they run in one continuous line.

My goal is to isolate specific rivers from these shapefiles and make each rivers into one polyline. I have a list of which rivers I am targeting.

Most likely, these rivers would take the longest paths in these shapefiles. How can I determine longest path of segmented polylines? Once I find the longest path I can determine which river it represented and separate it into its own shapefile.

I need to data calculate sinuosity of rivers.

I'm using ArcGIS 10.1 with an ArcInfo license.


texts: Implementing gdal2tiles tools by using GPU or OpenGL to accelerate speed?

texts:
The gdal2tiles.py is very useful, but it is some slow when I want 10 or up levels.
I think the bottleneck is I/O, so I want to how solve the problem by GPU?


texts: Building attribute table in 3-band raster using ArcGIS Desktop?

texts:
I have a 3-band (RGB) raster file from CORINE and the attribute table hasn't been built. When I try to execute the command BuildRasterAttributeTable I get an error that only single band rasters are allowed. What should I do to get the attribute with the land uses?

Error Message:

  ERROR 000423 Only single band integer raster dataset is a valid input


texts: Converting selected polygons to lines in QGIS modeler

texts:
I have a vector file which I would like to add using "add Vector Layer" (the vector file is a polygon).
I would like to convert the polygon file to lines, however only selected polygons.
I had an issue using "Extract by attribute" tool, which I tried using it to extract the polygon and then convert it to lines.

Vector Layer (Polygon) --> Extract by attribute (say polygon Name A and B) --> Polygon to lines (convert A and B polygons to lines).

Looking for help in designing it in "Processing Modeler" in QGIS.


texts: GeoDataFrame - Unable to select range of linestrings

texts:
df = sample['geometry']
line_gdf = gpd.GeoDataFrame(geometry=[df[2],  df[3], df[4], df[5], df[6], df[7], df[8], df[9]])

Above is the manual process of selecting Line Strings

In order to select from 2:180 I tried some code without luck

line_gdf = gpd.GeoDataFrame(geometry=[df[df.rows[2:4]])

it comes up with an error of'GeoSeries' object has no attribute 'rows'

I am bit confused how to solve it I would appriciate some guidance.


texts: How to find a object in by name in the properties?

texts:
I would like to change the color of one object in the shapefile. I have done it with every object of interest and it worked so far. But this one I can’t find by name in the properties. Is it possible to click on that shapefile with the “information button” and go directly to the properties where I can change the color? So far I couldn’t figure it out.

I am using the QGIS 2.12.3 - Lyon Version.


texts: changing layout of a gxp.plugins.WMSGetFeatureInfo response

texts:
Have a little problem with an app I’m building.
I´m using the openGeo suite SDK to create an app. I added a WMSGetFeatureInfo tool following the Boundless tutorial and to that point it was all ok. Then I decided to change the Templates to get just the meaningful part of the data. I made a Template following instructions here.
If I preview the layers using OpenLayers and click any feature I get the right answer but then if I go to my app and use the WMSGetFeatureInfo tool it ignores the config and shows me all the fields in the layer.

What I’m I doing wrong?


texts: Adding one search box for multiple GeoJSON polygon layers?

texts:
Multiple GeoJSON markers can be combined to one group layer then search on a specific attribute but doesn't work for GeoJSON polygons.

How to put multiple GeoJSON markers and polygons in one search box?

 var map = L.map('map', {
            zoom: 14,
            center: new L.latLng(35.948782,8.139912),
            layers: L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')
        });
    //Geojson points
    var piky1=new L.geoJson(pol00);
    var piky2=new L.geoJson(pol01);
    //Geojson polygones
    var piky3=new L.geoJson(pick1);
    var piky4=new L.geoJson(pick2);

      //group of Geojson points markers
      var lay=L.featureGroup([piky1,piky2]);
      //group of Geojson polygones
      var pik=L.featureGroup([piky3,piky4]);

   L.control.search({

   //If we consider searshing layers as the marker group
   //layer: pik,

   //If we consider searshing layers as the polygones group
    layer: lay,

   propertyName: 'Name',
    })
    .addTo(map);


texts: Saving Overpass query results to GeoJSON file with Python?

texts:
I have just started to use Python and I would like to make a query to Overpass and store the results in a geospatial format (e.g. GeoJSON).

As far as I know, there is a library called overpy that should be what I am looking for. After reading its documentation I came up with the following code:

import overpy

API = overpy.Overpass()

# Fetch highways within Granollers' city.

result = API.query("""
    area[name="Granollers"][admin_level=8];
    // query part for: “highway=*”
    (way["highway"](area);
    relation["highway"](area);
    );
    // print results
    out body;
    """)

The thing is that I am not familiar at all with python and I don't know how to store result as a GeoJSON file (Honestly, I don't even know what kind of thing result is -I tried with type(result) and I get overpy.Result as an output, which doesn't mean much to my poor knowledge). I have been reading overpy documentation but I haven't been able to figure it out.


texts: Creating post landslide simulation using ArcScene?

texts:
How do I create a simulation for post landslide with ArcScene?

It should able to show xyz plus velocity and thickness of debris at different time.


texts: Calculate invariant moments for a each polygon in shapefile

texts: I am working in python and have polygon shapefile created from polygonized binary raster. I populate the attribute fields for each polygon in a loop. I need to calculate the invariant moments fr each polygon and also write them into the attribute table. I was hoping to use the OpenCV library however it requires an array as input. Would anybody have an idea how to calculate this for the polygons or how to convert each polygon to a binary array (not and image file)?


texts: I have a map in SVG format. I can import it as an SVG symbol, scale it, rotate it and geolocate it, all as a symbol. This is great as I get all the plusses of a scalable vector graphic. I.e. when I zoom in it doesn't get blurry. Is there any way to import the SVG, which clearly QGIS understands as, as vector map layers?


texts:
I am struggling with this issue in QGIS. I have a KMZ file contain three files (exported from SNAP).

legend.png
overlay.kml
overlay.png

I tried to open the KMZ and it doesn't work.
I tried to open the KML after unzip the KMZ, and it doesn't work.
This file is generated by SNAP and contains Phase information.
I exported the file from SNAP as GeoTiFF but the legend is not the same:

and this the GeoTIFF in QGIS:

I can't define a color scale like the original one.
Anyone can help me?


texts: "gdalbuildvrt command not found" in Build Virtual Raster tool

texts:
I am trying to use the "Build Virtual Raster" tool in QGIS 3 to build a mosaic. When I run the tool, I get the following message:

GDAL command output:
/bin/sh: gdalbuildvrt: command not found

gdalbuildvrt is available in my terminal, but it appears that QGIS does not know where to find it. How do I fix this?

I am running:

QGIS 3.0.3
macOS 10.13.4


texts: Creating a raster of the residuals of a regression between two rasters

texts:
I am trying to create a raster of the residuals of a regression between two rasters. i.e. I would like to carry out a regression of one raster against another of the same extent and plot the residual for each cell of the raster at the same resolution and extent as the original rasters.

It seems the GRASS 7.0 has a function called r.regression.multi which would let me carry this out but I have zero experience in GRASS and I can't even get GRASS 7.0 to work (GRASS 6.4 works fine but doesn't have r.regression.multi so is useless!)

I currently have the files in almost every format possible (Idrisi raster, TIFF, ASCII .grd in R) any help would be much appreciated!


texts:
Why I am getting Data Source is Invalid in python console of QGIS when running:

vlayer = QgsVectorLayer("home/sanjayr/Desktop/india-latest.shp/buildings.shp","sanjay","ogr")

I am using QGIS 2.4 on Ubuntu 12.04 LTS.


texts: QGiS - Values missing from graduated style

texts:
I'm trying to do the very simple/standard task of presenting points (and then polygons created from them) as a graduated colour style, however many points are missing, evinced from the lowest number being higher than numbers I know to exist in the source data csv. I've checked and the csv field is read in as double so that's not the issue. In the original there are 857 rows; when graduated there are about 24. Same in V3.0.2 & 2.18.20. Same (with different lower bounds) for 2 csv files. Running colour conditional formatting on that column/field in excel works fine, data are distributed around well. You can see that compared with single symbol (red, all points), graduated has hardly any.

When reopening the project in v2.19.20 the range is initially messed up, but can be re-run to make it work, but the contracted range problem remains.

What is causing this?
I don't think I'm doing anything differently to usual - this feels like a weird bug.


texts: Install GRASS extension with g.extension and Rstudio

texts:
I want to use GRASS in Rstudio to crop my DEM with my GRASS region definited. I tried to install r.clipextension on GRASS with g.extension to realise this. But when I use the function g.extension to import r.clip in GRASS I have error ERREUR : Variable 'LOCATION_NAME' non définie. My code is :

install.packages("rgrass7")
library(rgrass7)

# Creation Grass environment
initGRASS("C:/Program Files/GRASS GIS 7.6",
          override = TRUE,
          gisDbase = "GRASS_TEMP",
          home = tempdir(),
          mapset = "PERMANENT",
          remove_GISRC = TRUE)

# To install extension
execGRASS(cmd = "g.extension",
          flags = "s",
          parameters = list(extension = "r.clip", operation = "add"))

And the code to install extension return this error :

> execGRASS(cmd = "g.extension",
+           flags = "s",
+           parameters = list(extension = "r.clip", operation = "add"))

ATTENTION: Extension <r.clip> already installed. Re-installing...
Downloading precompiled GRASS Addons <r.clip>...
ERREUR :Variable 'LOCATION_NAME' non définie
ERREUR :Variable 'LOCATION_NAME' non définie
ERREUR :Variable 'LOCATION_NAME' non définie
Traceback (most recent call last):
  File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 1748, in <module>
    sys.exit(main())
  File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 1727, in main
    install_extension(source=source, url=url, xmlurl=xmlurl)
  File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 702, in install_extension
    blist = install_extension_xml(xmlurl, mlist)
  File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 922, in install_extension_xml
    write_xml_modules(xml_file, tree)
  File "C:/Program Files/GRASS GIS 7.6/scripts/g.extension.py", line 601, in write_xml_modules
    libgis_revison = grass.version()['libgis_revision']
KeyError: 'libgis_revision'

> execGRASS(cmd = "r.clip",
+           flags = "overwrite",
+           parameters = list (input = "GRASS_MNS",
+                              output = "GRASS_MNT_crop"))

Error : XML content does not seem to be XML: ' No such file or directory'
De plus : Warning message:
In system(cmd0, intern = TRUE) :
  l'exécution de la commande 'r.clip.bat --interface-description' renvoie un statut 2
Error in parseGRASS(cmd, legacyExec = legacyExec) : r.clip not parsed

When I check the manuel of the g.extension function, I saw that -s argument in flags can to be use but the system administrator rights are necessary. So I have given the right at my folder where GRASS 7.6 is installed and I'm administrator of my computer.

When I install r.clip in Grass interface, installation is successfully finished but it's impossible to find r.clip extension in extension list of Grass.

But when I research r.clip extension in Rstudio with code below, I find it !

> execGRASS(cmd = "g.extension",
+           flags = "l")

ATTENTION: GRASS_ADDON_BASE is not defined, installing to ~/.grass7/addons
List of available extensions (modules):
r.clip
...

I use GRASS 7.6.1 installed in C:/Program Files/GRASS GIS 7.6 and R 3.6.1.


texts: Technical requirements for installing Geoserver and having a web mapping platform

texts: I have taken up a new job, and I need to undertake some web mapping sing Geoserver. I have no idea the hardware required to install Geoserver and do web mapping. I know there is a server involved, is it the server that will host my installation and the platform ? I can't quite figure out the whole set up yet.


texts: Cutting leaflet map in R to a specific area

texts:
I am trying to cut a leaflet map in R, so I only show a specific municipality. I have manage to hide the remaining municipalities in the country, but that leaves the water and the rest of the world visible.

dk <- getData("GADM",country="Denmark",level=2)

frb <- dk[dk$ID_2!=10,]

leaflet() %>%
  setView(lat=55.680544, lng=12.519379,zoom=13)%>%
  addTiles(group="Kort") %>%
  addPolygons(data = frb,
          fillColor= "white",
          fillOpacity = 1,
          weight = 2,
          color = "white")

I think I need to make a polygon of the remaining world and make it white, but I can't figure out how.


texts: How to overlay geographic data from multiple sources?

texts:
Being a newbie to GIS, I am trying to create a map using shapefiles and addresses found online, as an exercise. The steps are below:

I downloaded a shapefile of Connecticut from the following link (Connecticut State House Districts; CT House Districts; 2010)
I picked up a list of hospitals in Connecticut from this link
I use the R script from this link to obtain a long/lat for each hospital
I followed this discussion here to create a shapefile for hospitals; hospitals are presented as points
I used QGIS to import the 2 shapefiles, the Connecticut boundary file, and the hospital location file

But I find that the hospitals are not located within Connecticut: the dots are displaced to other empty space, not on the Connecticut map.

I wonder if I missed anything when I was creating the shapefile for hospitals.  Can anyone help? Thanks.

Below is my R-script for creating the hospital shapefile. I guess the CRS is the problem, but I'm not sure.

hosp.shp <- SpatialPointsDataFrame(coords=hosp.list[,c("coord_x","coord_y")],data=data.frame(hosp_name=hosp.list[,"hosp_name"]),proj4string=CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"))

writeOGR(hosp.shp,dsn="hosp_shp",layer="hosp_shp",driver="ESRI Shapefile")

update 01

I am using wgs84 version of Connecticut State House Districts, CT House Districts, 2010. I don't have specific reason to use this shp file, I just see this has quite a few of polygon, which may be easier for me to continue my GIS exercise.

Some elaboration on step 2. From the link, I have the names of quite  a few of hospital, I used R to access google map to extract the long/lat for each hospital, e.g. "Advanced Center for Rehabilitation Medicine" has the long/lat of 41.1175966,-73.4078968.

I used google map to help me do the geocoding, and now I have a table with the name of the hospital, its long and lat. Then this table goes to step 3, using R again to produce a shp file. I import the self-made and the Connecticut shp file into QGIS, both layer can be show, and I can see the hospital seems to cluster to some location, but all of the hospitals are not located within the boundary of Connecticut, they are FAR away.

For the hospital shp file, I used CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"), which is copied direct from the Connecticut file, hoping that this will fix the "misalignment" problem, but no dice.


texts:
I'm trying to make a map of Russia in the Albers projection. My projection string is:

+proj=aea +lat_1=45 +lat_2=70 +lat_0=40 +lon_0=100 +x_0=20 +y_0=20
  +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

Which produces a very nice-looking map, except that the projection is in meters, and I need it in lat/lng. However, whenever I try to remove +units=m from the projection string, QGIS adds it right back in.

How do I get this projection in a coordinate format? Is there a similar but different projection I could use that QGIS will allow to be in lat/lng (preferably that's also supported by d3 or d3.geo.projections, which is how I expect to show these coordinates)?


texts:
I am a newbie in mapping services. I have some GeoTIFF files that I am trying to put on my OpenLayers 3 map. However, I am not finding a solid answer about putting a GeoTIFF on OpenLayers 3.

I searched OpenLayers 3 library, but I did not find a good amount of details on GeoTIFFs. I looked up my question online, but I found vague answers. Some people suggested that MapTiler should be used to overlay GeoTIFFs. I tried it, but it is asking me to upgrade to PRO version (I am a college student. I don't have money).

Additionally, some people suggested QGIS, MapServer and GeoServer.

I don't understand why I need them and how can they help me in rendering my GeoTIFF on my OpenLayers map?

Some pages also mentioned about WMS. Should I convert my GeoTIFF in WMS and then add it to the map?


texts:
I have a problem in exporting a QGIS project to an OpenLayers web map using QGIS2Web.

While exporting the project the browser opened and showed the correct map (index.html). Then I saved the file for later use. But after clicking on the file name I ran into a problem:

The browser started, but showed an empty screen.


texts: addControl give a problem with ol.control.FullScreen

texts:
I'm experiment some customizations of OpenLayers, when I try to use map.addControl with ol.control.FullScreen I see this error message:

Uncaught TypeError: t.element.setMap is not a function

This message cames from PluggableMap.js.
I do this:
var map = new ol.Map({
  target: 'map',
});

var fullScreen = new ol.control.FullScreen({className: 'ol-full-screen', tipLabel: 'Toggle full-screen'});
map.addControl(fullScreen);

var scaleLine = new ol.control.ScaleLine({className: 'ol-scale-line', target: document.getElementById('scale-line')});
map.addControl(scaleLine);

var view = new ol.View({
  center: ol.proj.fromLonLat([9.25040, 45.54318]),
  zoom: 2
});
map.setView(view);

var osm = new ol.layer.Tile({
  source: new ol.source.OSM()
});
map.addLayer(osm);

If I comment fullScreen I can see whitout problems the map.


texts: Is it possible to do scale dependent rendering in Google maps with KML?

texts: I have some data that I would like to display in greater detail as the user zooms into the interactive Gooogle map.  Does google support dynamically turning layers on and off depending on the scale?


texts:
I have successfully exported .esriaddin I created in 10.2 Arcobjects SDK to 10.0. The installation succeeded but the problem I am having is that whenever I use the command me.Close() to close the form Arcmap 10.0 crashes when i press the button. I have inserted that code in the OnClick method of a button on the form. However the same esriaddin works fine in 10.2 and me.close() has no problems.

Any ideas?


texts: Cutting and pasting polygons in QGIS so they do not overlap?

texts:
I use QGIS, and I need to cut and paste polygons so they don't overlap. Here's what I mean: I have shapefiles for cities that I'm pasting into a new polygon shapefile. I also have shapefiles for counties, and I want to cut and paste the parts of the counties that are NOT part of a city.

Sometimes it will automatically paste it the way I want, as if it's reading my mind. Sometimes it will not. Other times, it will paste a much-simplified version of the polygon that's unrecognizable. There's no way to predict what it will do.

How do I make it so it ALWAYS pastes it as a non-overlapping polygon?


texts: Create a grid with all polygons labelled - Index style

texts:
I've been looking at creating an indexed grid and have used vector--grid, mmqgis--create grid and FSC Tools.

They all work fine but don't label the grid squares. With the one created by vector grid, there is left/bottom/right and top so if we sort by top then the highest value is the top left grid square -which I want called A1.

The next in the list is A2 and then when the top value changes it's row B etc.

Is there some switch or other tool that can add these labels?

I noticed there's a QGIS 2x plugin (https://plugins.qgis.org/plugins/createnamedgrid/) but I haven't found one for v3.

I have tried the process in Creating indexed vector grid in QGIS? but it doesn't work as expected.

I wonder if this has something to do with the row ID's being assigned based on the order the table was written in...it should be Top (highest to lowest) and Right (lowest to highest) to get the grid in the right order to test this. I have tried the sort and number plugin and changed 15 in the solution to 36 to represent the number of squares left to right but it still doesn't work.


texts: Maxent Error reading output row and column

texts: I need to predict geographical distribution of an insect using maxent. I have converted the bioclim data variable to ascii format to use with the collection records. After loading the files and when maxent has successfully written the output ascii file then an error message comes up. it says that there is error reading the output row x and column y. The html file is therefore empty. Could someone be knowing what I can do about this?


texts:
I am using the reverse geocoding service provided by MapQuest.

For a sample coordinate of N 53.27, E 8.13, I receive the state of "Lower Saxony". According to Wikipedia, and a user of my service, the German answer is "Niedersachsen".

Using the MapQuest API, is there any way to change the language of the results service?

Alternatively, if I can't do that using the MapQuest API directly, is there a web based translation service that could be suggested to make that translation?


texts: arcpy.ListLayers crashing due to CAD data - no traceback

texts:
I encountered some problematic arcpy behavior when running this code.  This code eventually creates an inventory of source data per layer used for each map contained in a directory (mxd_dir).
# get list of all mxd filenames within directory to inventory
mxd_list = os.path.listdir(mxd_dir)
# list of full file path
fp_mxd_list = [os.path.join(mxd_dir, mxd) for mxd in mxd_list]
# get mxd_obj
for fp_mxd in fp_mxd_list:
    mxd_obj = arcpy.mapping.MapDocument(fp_mxd)
    # HERE IS WHERE ARCPY EXITS PYTHON
    arcpy.mapping.ListLayers(mxd)

Arcpy is breaking from the Python script without throwing an exception/error or any indication of what failed - Python interpreter simply quits.  This is occurring with arcpy.mapping.ListLayers on a particular mxd.  The file is not open anywhere, conforms with file naming conventions for the other files, no broken file paths.
I am not sure why arcpy does not print an exception statement to help diagnose failure.
Note: since posting I have determined that it was CAD data used within an MXD causing the issue, so it should be mentioned that the problematic mxd file contains CAD data.  I have addressed the CAD issue in the comments essentially as the solution.
ArcMap 10.6, Windows 64 bit.


texts: I have moved my QGIS Project to a new Directory. On opening the project in new folder, Handle Bad Layer window pops up with a list of shp and csv files. I am able to correct the shp files using browse button but browse button is disabled when I am trying to provide the new path for csv files.


texts: 1000 features limit using CopyFeatures_management?

texts:
I wrote a script to select features from a sql server spatial database based on date, there are thousands and thousands of records. The script runs but when I used the CopyFeatures_management tool, the resulting feature class only has 1000 features in it when it should have more. (the correct amount is achieved when I run the process manually) I'm running ArcGIS 10.4 if that makes a difference.

I'm hoping to find out why the script doesnt fully complete and crashes before finishing and only selects 1000 records.

print "start"

import arcpy
from arcpy import env

env.overwriteOutput=True

DB_connection = "Database Connections\\CNTM_MAC_GIS(EPRD-SHS12-LTR,62246).sde"
Output_Feature_Layer = "gps_points"

arcpy.MakeQueryLayer_management(DB_connection, Output_Feature_Layer, "select * from CMTEN_MAC_GIS.dbo.tben_SCSGPSData", "Record_ID", "POINT", "4326", "") #selecting from sde

selection=arcpy.SelectLayerByAttribute_management(Output_Feature_Layer, "NEW_SELECTION", "RecordUpdate_DTM > '2018-10-01 07:48:09' AND RecordUpdate_DTM < '2018-10-30 07:50:04'") #selecting date ranges, beginning to end of month

saved_to="W:\MAC\GIS\Client_Requests\Stats\gps.gdb\gpspoints" #output filepath
arcpy.CopyFeatures_management(selection, saved_to) #saving to location

print "done"


texts: Tin created from raster have different profile graphs?

texts:
I have created a TIN file from a Raster one, but the profile graph from TIN is different from the Raster. Here I attach a image where in the left is a profile graph from the raster, and on the right is a graph from TIN.

Both the profiles are exactly from the same place.

Shouldn't the profiles be the same?

For information, to create the TIN I used "Tin to Raster" tool. The parameters are shown in this picture. I did not change anything else!


texts: How to use MasterMap address layer with QGIS?

texts: I have a copy of QGIS.  I have a MasterMap address layer for my area.  How do I get the map onto my computer and open it please?


texts: Unsupervised Vector Classification in QGIS

texts:
I am trying to mimic a vector classification process in QGIS that can be done using the ArcGIS Business Analyst Segmentation Module in ArcMap.

My current best solution is to rasterize each of the attribute table columns one by one, put them into an image stack, and use an unsupervised Orfeo Toolbox classifier to classify the image stack.  Although this method is cumbersome, time consuming, and has creates issues for analysis.  Any ideas?


texts: OTB vector segmentation result is flipped

texts:
I'm using Monteverdi 2 to perform a mean shift segmentation on an image of an archaeological dig, to test the feasibility of automatic detection of elements.

I've loaded the image in Monteverdi and defined the export feature shapefile, with all other parameters as default.
The resulting shp polygon features, when viewed in QGIS, are flipped vertically as so:

Why does this happen?


texts: OS Open Background out of alignment in ArcGIS

texts:
When using the "OS Open Background" service in ArcGIS 10.3 alongside some OS Local vector data, I noticed that when zoomed in they align perfectly (see first image). However, when zoomed further out they appear to be out of alignment (see second image - the dark grey line should be under the red line). Can anyone explain to my what is the cause for this?

I had a response from ESRI (via Twitter) but I don't understand: "This is due to the reference scale of the different products at the different scales. Strategi data is very generalised (as a product to display at that scale needs to be) and so it causes these discrepancies."

I could understand if it was the other way around, i.e. looking OK at smaller scales, but zooming in showing a small difference. But it's the other way around.


texts: Applying colormap to grayscale tiff image using java

texts: I have a gray scale tiff image.Now i want to add some pseudo colors i.e for pixels whose DN from 0-140, red color;DN from 141-255 ,blue color.Please tell me how to modify the raster table.Otherwise if you have any other solution,please let me know.It is urgently required for my project....


texts: Saving processing results in a file using QGIS modeler?

texts:
From a model, I would like to save processing results in a file. In my model I have some Extract by location algorithms (with two vector inputs) producing reasonable results but only as temporary layers, which I have to Save as... manually, which for a pile of analyses is bothering and time consuming.

Best, I would like to pass a path to my model, where my results are saved as shapefiles (in a first step).

This is the model. Note that the output vector (file) cannot connect to any of the processing results:

As can be seen in the screenshots a), we are able to pass a name for a final result, but not a file, even in the Save selected features algorithm b).

a)

b)

I have a vague idea how to achieve this with a python script, but can this be done with a combination of existing tools?


texts:
I want to start using QGIS. I have worked in ArcGIS but I would like to start learning QGIS online.

Any suggestions for good online courses (hopefully free or not very expensive)?


texts: Use of Airbus WorldDem altimetric values (EGM2008)

texts:
In France, the altimetric values are issued from a mesure of heights above the sea level based on the Marseille's tide gauge. If i didn't mess it up, the system is named NGF - IGN69 for mainland (See https://en.wikipedia.org/wiki/General_levelling_of_France).

In the dataset named WorldDEM from Airbus, I see the vertical reference is EGM2008 (Ref : http://www.engesat.com.br/wp-content/uploads/663-2015_04_worlddem_technicalspecs_version2.pdf)

Are those two compatible ? Can I compare/mix both and/or does one needs to do a transformation to be in the same altimetric system ? Said differently : can I use WorldDem in France without doing any transformation/shift ?


texts: How does qgis render vector layer on screen ? How can I do the same in a mobile device

texts: Can you please tell me how does qgis software render the vector layers on the screen. I have a geojson file and I need to map its contents on the screen just like qgis does but without using base map layer or map tiles being downloaded whenever I drag etc. To be more precise, if I want to take the qgis software's map display area and put it on a mobile screen, how do I do it.


texts: Increase max zoom for large scale raster with GeoServer

texts:
I'm serving a large scale raster (warehouse map) with GeoServer.
I consume the WMS in a Leaflet web client and coordinates are projected according to EPSG:3857.

But it seems that maximum zoom is limited and can't go beyond scale of 1/20000. Even with the Leaflet maxZoom variable set to 100 when I pass the zoom 18 no more tiles are displayed.

How can I configure GeoServer to increase its maximum zoom?


texts: How to Change the schema of SDE dataset in Connected environment

texts:
We continuously use to receive changes in Schema ( field +/-, domain changes etc )  for our Utility dataset..

Since we have swicthed to a multiuser Geodatabase ( ArcSDE on Oracle ) , we would like to make apply this schema changes without affecting our current workflow.

How can we change\update the new schema on our existing SDE dataset , with minimal stoppage of the workflow ? One easy way would be to remove the existing dataset and configuring the new dataset ( which has new schema ) but wouldnt that make the existing completed jobs incompatible with the new schema ?

A quick response from experts highly appreciated.


texts:
I would like to find out how to access google satellite map version to update on SAS planet.
https://www.youtube.com/watch?v=rqpu792C1ic


texts: How do I use Oracle Locator's mdsys.sdo_geometry with ArcSDE?

texts:
I'm using the Oracle Locator MDSYS.SDO_Geometry type to store my spatial information and then accessing it through ArcSDE. I'm confused about how the precision component of the metadata is used and more specifically how it relates to GPS accuracy.

What is the maximum precision that I can use with ArcSDE?

This is a sample of my code:

Create sequence for object id column (oid)

CREATE SEQUENCE seq_myTable_oid
 MINVALUE 0
 MAXVALUE 99999999
 START WITH 1
 INCREMENT BY 1
 CACHE 20;

Create table

CREATE TABLE myTable
(
 id INT NOT NULL,
 geom MDSYS.SDO_GEOMETRY NOT NULL,
 oid INT NOT NULL
);
ALTER TABLE myTable
ADD CONSTRAINT pk_myTable PRIMARY KEY (id);

Create insert trigger on myTable for OID

CREATE OR REPLACE TRIGGER myTable_i
  BEFORE INSERT ON
  FOR EACH ROW
DECLARE
BEGIN
  SELECT seq_myTable_oid.NEXTVAL INTO :new.oid FROM DUAL;
END;
/

Insert geom metadata for myTable

INSERT INTO USER_SDO_GEOM_METADATA
VALUES(
'MYTABLE','GEOM',
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT('X', -180, 180, 0.00005),
    MDSYS.SDO_DIM_ELEMENT('Y', -90, 90, 0.00005),
    MDSYS.SDO_DIM_ELEMENT('Z', -10000, 100000, 1)
     ),
   4326
);

Create spatial index on table

CREATE INDEX sp_idx_myTable_geom ON myTable(geom) INDEXTYPE IS MDSYS.SPATIAL_INDEX;

Register table with SDE

sdelayer -o register -l myTable,geom -C oid,USER -t SDO_GEOMETRY -P HIGH -e l3 -s serverName -i instance -u userName -p password


texts: Removing message after wfs-t transaction

texts:
Is there a way to remove the alert message after adding new objects to
the database with WFS-T. I am using code from demo example from GeoServer. The
code is shown below

  var drawPoint = new OpenLayers.Control.DrawFeature(
                roads, OpenLayers.Handler.Point,
                {displayClass: 'olControlDrawFeaturePoint'}
            );
            drawPoint.featureAdded = function(feature) {
                feature.layer.eraseFeatures([feature]);
                // cast to multipoint
                feature.geometry = new OpenLayers.Geometry.MultiPoint(
                    feature.geometry
                );
                feature.style.strokeColor = "#0000ff";
                feature.state = OpenLayers.State.INSERT;

                feature.layer.drawFeature(feature);
            }

Is there a way to remove this alert. Or maybe just to get the part SUCCESS
or FAILED??


texts:
I would like to use SOAP or REST with FME Server 2011. But for SOAP, Safe Software propose to send an email for more information.  Does anyone have experience with this API?

Tools: Visual Studio 2010 / CSharp / Wpf


texts: Can ArcGIS for Desktop auto populate Date Field with current date/time when feature is created?

texts:
I am using Arc Desktop 10.3.1 in a versioned environment.  In the geodatabase for the service requests there is a field called Date Notified.  I would like this field to be auto-populated with the current date\time when a new feature is created. ( See attached picture)  I have tried setting the field to Now() (Now) (Current_Timestamp) and others and each time it tells me my syntax is incorrect.  Is this possible to do and if so what is the correct syntax to accomplish this.

Also I am aware of attribute assistant but I do not want to use that.


texts: Getting error in compiling make file for plugin build in qgis 1.8

texts: I am using QGIS 1.8 for building plugin. For developing i am using following ref this link example. where in this step 6 where compile the makefile in OSGeo4W. gives error pyuic4:command not found. I am also showing print screen of error:. Please help me to over come this error Or running same in python console of qgis 1.8


texts: What is the correct order for compressing, rebuilding indexes and updating statistics in ArcGIS?

texts:
I want to script out the compressing, rebuilding of indexes and updating statistics on our ArcSDE databases, but I want to make sure I have the correct order for these to run.
What would be the correct order? Should I run certain ones more than others?
For the order, I would assume:
1) Compress
2) Rebuild indexes
3) Update statistics

But really I'm not positive.


texts: Batch converting 10.4 mxd files to 10.1 with ArcPy gives AttributeError: MapDocObject: Unable to save?

texts:
Closely related to Converting .mxd files that were created with 10.3 to .mxd files that are compatible with 10.1, except I am running ArcGIS 10.4. It should be possible for me to make 10.1 copies of all my 10.4 mxds. Here is my code:

import arcpy, sys, os, string

dir = r"D:\Path\To\Maps"
outloc = os.path.join(dir, "Compatible_MXDs")
version = '10.1'

suffix = "_"+ version.replace(".", "")

# Get all mxds in this directory
arcpy.env.workspace = dir
mxdList = arcpy.ListFiles("*.mxd")

for file in mxdList:
    print(file) # mymap.mxd
    mxd = arcpy.mapping.MapDocument(os.path.join(dir, file))
    base = os.path.basename(file)
    print(base)
    # ('D:/Path/To/Maps/mymap', '.mxd')
    base = os.path.splitext(base)[0] + suffix + os.path.splitext(base)[1]
    mxd.saveACopy(outloc + os.sep + base, version)
    print(os.path.basename(file) + " has been converted")

But I get the same error:

Traceback (most recent call last):
File "MakeMXDsBackwardsCompatible.py", line 21, in <module>
mxd.saveACopy(outloc + os.sep + base, version)
File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\utils.py", line 182, in fn_
return fn(*args, **kw)
File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\_mapping.py", line 877, in saveACopy
self._arc_object.saveACopy(file_name, version)
AttributeError: MapDocObject: Unable to save.  Check to make sure you have
write access to the specified file and that there is enough space on the
storage device to hold your document.

I'd rather not use the "File -> Save a Copy -> change mxd version" dialogue for 500 separate mxds over multiple directories.

While my question is also closely related to AttributeError: MapDocObject: Unable to save on mxd.save/saveACopy?, the answers are still not satisfactory for my problem. The relevant (simplified) code:

mxd = arcpy.mapping.MapDocument(r"D:\Path\To\Maps\mymap.mxd")

mxd.saveACopy(r"D:\Path\To\Maps\Compatible_MXDs\mymap_101.mxd", '10.1')

Now with regard to that question's answers...

1) I have no mxds with the same name already on disk, nor am I trying to overwrite.

2) I am not attempting to overwrite an mxd file that is already in use. No other scripts are concurrently accessing it. Furthermore nothing changes even after I add

del mxd

at the end.

3) Again, I am not calling anything like

mxd.saveACopy(mxd)

I have read the documentation.

I have tried rebooting and running my script without starting ArcMap. I don't use an IDE, but use Notepad++ to write my scripts and execute them on my command line with python MakeMXDsBackwardsCompatible.py


texts:
How complete are the Fusion tools in QGIS? I have them installed and (vaguely) working, but there are only about ten of them. Is the idea of having just a few tools available, that one can use LAStools for the other functions (say, format conversion)?

Also, is there a tool for canopy heights as las or shp, rather than grid?

Further, some of the Fusion tools run and create output. Others start running for a while and quietly die. Is there somewhere that error messages accumulate in QGIS?


texts: Pass Leaflet Draw Marker to Turf.js point

texts:
I am trying to dynamically supply turf.point([coordinate array]) with values from leaflet.draw markers.

I can only find hard coded examples for all turf examples. I hope my goal is clear here. I will be grateful for any direction provided here.

I will demonstrate...

// Draw controls
var drawControl = new L.Control.Draw({
    position: 'topright',
    draw: {
        polygon:false,
        polyline: false,
        rectangle: false,
        circle: false,
        marker: {
            icon: cssIcon
        },
    },
    edit: {
        featureGroup: drawnItems
    }
});
map.addControl(drawControl);

     map.on('draw:created', function (e) {
        var type = e.layerType,
            layer = e.layer;

        if (type === 'marker') {
            //Grab Coordinates As Array
        }

        drawnItems.addLayer(layer);
    });

////////////////////////////////
// Pass marker to turf.point
var point = turf.point([*Pass Array Here*], {
    "marker-color": "#6BC65F",
    "title": "Start Point"
});


texts:
I´m pretty new to QGIS and hence I do not know yet what is possible or not.
I want to calculate the shortest distance between several points in a layer.
Assuming I have 6 places I want to visit. Mom, dad, sister, brother grandma, grandpa. I have geographical coordinates for all of them. Now I want to know in which order to visit all of them to have the shortest distance.

I´ve already calculated a distance matrix and used several nearest neighbour plugins. However, I´ve not found a solution yet.
Anyone struggled with something comparable?


texts: Assign a specific color to vector layer based on RGB codes in attribute table

texts:
I use QGIS and have a geological map for a large area. I present this after ID codes based on the geology ("Geokartnr" in photo).

I want to use  international/nation color codes for each rock type, this way it will be comparable to other peoples work. The international colors is already added to the attribute table as a RGB code ("RGBfargko"). Is there any way I can sort/present the maps by "geokartnr" code and present this by the color codes in the RGB codes in the attribute table? Or do I need to change all colors manually?


texts: Finding area within set radius using QGIS?

texts:
I'm new to QGIS and I want to use it to model the land area within a 90km radius of a point.

I have my location and I have 32 shapefiles and I would like to draw a 90km radius around my initial location and determine the area covered by shapefiles within the radius.


texts: Setting placement labels on "Offset From Point" with OffsetX,Y parameters in PyQGIS?

texts:
I'm trying to set properties of QgsVectorLayer using QGIS 3. I want to put labels with "Offset from point" and define "Offset X" and Offset Y". I saw on the documentary that there is a class "setQuadrantPosition" from QgsPalLayerSettings but i don't know how to use it. Here is my code :

layer=iface.activeLayer()
layer_settings  = QgsPalLayerSettings()
layer_settings.fieldName = "Name"
layer_settings.enabled = True
layer_settings = QgsVectorLayerSimpleLabeling(layer_settings)
layer.setLabelsEnabled(True)
layer.setLabeling(layer_settings)
layer_settings.setQuadrantPosition(5)
layer.triggerRepaint()
qgis.utils.iface.layerTreeView().refreshLayerSymbology(layer.id())

Here is a picture of what i want to set up :


texts: Does anyone know if you can create a non-earth local grid in QGIS. Local grids were commonly created in the past and are plane grids with eastings and northings from a specific reference point. QGIS only appear to be able to use real world coordinates with known projections. MapInfo has a non-earth feature that allows you to import local grid data and display it without it being in a known projection. This is particularly important when entering old data which was not referenced to real world coordinates.


texts: "Could NOT find Python" error when compiling QGIS source code

texts:
I tried to complile QGIS source code according to the method from QGIS's INSTALL.md on my windows computer and did't know why CMake couldn't find the proper Python version although I had added related environment variables in system PATH. I tried some solutions but they didn't seem to work.

How can I solve it?


texts: Seeking ArcGIS Pro SDK equivalent to geometry.measureOnLine(point) of ArcPy?

texts:
I am looking for a method in the ArcGIS Pro SDK 2.2 that will return the measure distance along a given polyline geometry.

Here is the python method

 measure = polylineGeometry.measureOnLine(pointGeometry)


texts: Optimize fetching road information from OSM

texts:
I am using the following query to fetch road data from planet_osm_line

SELECT   maxspeed,   highway,   ref,   name,
 ST_Distance(
  ST_SetSRID(ST_Point(-98.224861,38.811898),4326),
  ST_Transform(way, 4326)
 ) as distance
FROM planet_osm_line
WHERE highway is not null
AND ST_DWithin(
    ST_SetSRID(ST_Point(-98.224861, 38.811898),4326),
    ST_Transform(way, 4326),
    0.0009
)
ORDER BY ST_Distance(
    ST_SetSRID(ST_Point(-98.224861,38.811898),4326),
    ST_Transform(way, 4326)
) LIMIT 1;

Since i am using north-america database imported with osm2pgsql its taking upto 12 seconds. is there a way where i can optimize this and bring the time close to 1s?


texts: Why locate GPS control/monitor segments near equator?

texts:
It's well known why we launch satellites near the equator, but why are the GPS control/monitor segments located near the equator at Hawaii, Ecuador, Florida, Bahrain, Ascension, Diego Garcia, Guam and Kwajalein?

For example:


texts: How to georeference two pictures that do not have crs in QGIS

texts: I would like to take aerial pictures of my research plots an caculate NDVI and NDWI. How do I do that in QGIS?


texts: Extracting a part of SVM predicted output

texts:
I have predicted few raster images using svm model. I'm trying to mask only part of predicted model to a raster file .  Classification is arrayof 1's and 2's which represents land use and land cover. Looking for only land use when trying to read the data. Below is the code:
bands_data = np.dstack(bands_data)
bands_data =np.nan_to_num(bands_data)
rows, cols, n_bands= bands_data.shape
n_samples = rows * cols
flat_pixels = bands_data.reshape((n_samples,n_bands))
r = clf.predict(flat_pixels)
result = np.array([int(i) for i in r])
classification = result.reshape((rows,cols))

def write_geotiff(fname, data, geo_transform, projection):
    """Create a GeoTIFF file with the given data."""
    driver= gdal.GetDriverByName('GTiff')
    rows, cols= data.shape
    dataset= driver.Create(fname, cols, rows, 1, gdal.GDT_Float32) #   # gdal.GDT_Byte
    dataset.SetGeoTransform(geo_transform)
    dataset.SetProjection(projection)
    band= dataset.GetRasterBand(1)
    band.WriteArray(data[np.where(data == 1)])
    dataset=None #Close the file
    print("done")
output_file = fname
write_geotiff(output_file,classification, gt, proj)


texts:
I am building an interactive web bike map and I would like three baselayers. Currently, I have an OpenStreetMap layer and I would like to add a topography layer. I am aiming for something shown on this website: http://www.vttrack.fr/ The three baselayers I am aiming to get are OpenStreetMap (I have this), topography map, and IGN map.
My coordinate reference system is EPSG:3857
Can I get the topography data from the OpenStreetMap?
My map can be found here: https://revyrob.github.io/bikeSerChe/map2.html
I had made a topography map using Mapbox but when I created the html with qgis2web the map did not work as a baselayer. By creating my own map on QGIS I don't have to worry about fees incurred with Mapbox and I am also excited to learn.


texts:
After polygonization of a raster, I would like to dissolve all polygons with same value.

So I tried to use :

gdf.dissolve(by='column')
gdf.dissolve(by='column', aggfunc='first')
gdf.dissolve('column')

But every time it returns same error :

  Assertion failed: (!static_cast("should never be reached")),
  function itemsTree, file AbstractSTRtree.cpp, line 373. Abort trap: 6

My geodataframe have only 2 fields, geometry and raster_val

What is wrong?


texts: Looking for (nearly) worldwide elevation data

texts:
I know the raw ASTER and SRTM datasets. Is there any error corrected version available? Or did anybody already combine the data? At least the ASTER data often misses tiles for costal regions (if there is only few elevation and the file would be nearly empty).

(I don't mind if I have to pay a fair price for it and it could even be just a web service where I get elevation data for a certain coordinate)

Jan


texts: Error importing ground control points ArcGIS Pro

texts:
I am working on processing aerial images from an automated drone flight in ArcGIS Pro. The photos import into the Ortho Mapping workspace just fine, and the Quick Adjust alignment runs without problems (not all photos are displayed at this scale in the image below). However, when I try to import Ground Control Points via the Import GCPs tool, it fails with the error:

  ERROR 000735: Target Control Points: Value is required

The only parameter value I don't have filled in on the tool dialogue is GCP Photo Location, which as far as I can tell is optional. http://pro.arcgis.com/en/pro-app/help/data/imagery/add-gcps-to-your-ortho-mapping-workspace.htm

I have run this exact same operation in the past with the same dataset and did not encounter any problems. Am I missing something?


texts: Plotting VIIRS against Longitude in Google Earth Engine

texts:
I am having issues plotting average radiance from VIIRS dataset against longitude in the h-Axis. I have this code but I am getting an error message. Does anybody know what the problem is?

// Load VIIRS  - to be summarized by longitude bins.
var viirs = ee.ImageCollection("NOAA/VIIRS/DNB/MONTHLY_V1/VCMCFG")
  .select('avg_rad').first();

// Load lat/lon image - select the longitude band.
var latLon = ee.Image.pixelLonLat().select('longitude');

// Make a list of longitude bin start values.
var step = 5; // longitude step
var lonStarts = ee.List.sequence(-90, 90-step, step);

// Map of the longitude list - get the mean radiance value for pixels in given
// longitude bin. Returns a list of features.
var lonStatList = lonStarts.map(function(lon) {
  var startLon = ee.Number(lon);
  var endLon = startLon.add(step);
  var targetPixels = latLon.gte(startLon).and(latLon.lt(endLon));
  var stat = viirs.updateMask(targetPixels).reduceRegion({
    reducer: ee.Reducer.mean(),
    // Set geometry as needed - global in this case
    geometry: ee.Geometry.Rectangle(-179.99, -89.99, 179.99, 89.99),
    scale: 10000, // Change scale as needed
    bestEffort: true});
  return ee.Feature(viirs.geometry(), stat).set('lon', lon);
});

// Convert feature list to feature collection.
var lonStatsCol = ee.FeatureCollection(ee.List(lonStatList));

// Chart the results.
var chart =
  ui.Chart.feature.byFeature(lonStatsCol, 'lon', 'avg_rad')
    .setOptions({
      title: 'Average Radiance by Longitude',
      hAxis: {title: 'Longitude'},
      vAxis: {title: 'nanoWatts/cm2/sr'}
    });
print(chart);


texts:
I have two point layers, X layer and Y layer, with nearest node on a road network calculated for each.
I wish to calculate the shortest path from X nearest node to Y nearest node. I do not want matching shortest distance X-Y pairs and wish to specify that X nearest node is the start point with Y nearest node (shortest distance) being end point to calculate the distance between them?
Are there multi-multi pgrouting functions which enable user to specify such?


texts: Giving numbers to each grid cell by rows in ArcMap?

texts:
I want to assign cell numbers to each grid cell (only having a point in the middle) beginning with 1 at the upper left corner, numbering consecutively by rows. The cells that I want to number are shown below.

Could you help me do that?


texts: Finding an ogr2ogr equivalent of SelectLayerByLocation

texts:
So I'm trying to take individual grid point buffers and only select the regions that the points intersect with (via SelectByLocation). Generally I run the following code to:

Explode multipart features (not inlcuded in code below)
create a Feature Layer
Make the Selection and
then turn the selected features in the Layer into a new Feature Class

Below is the code for ArcGIS's arcpy:

for a in geogList:
    for b in radbufListFn:
        for c in idList:
            layerName = a+b+"_erase_exp_"+c+"_Layer"
            arcpy.MakeFeatureLayer_management(wp+"geogs/split_geogs_explode.gdb/"+a+b+"_erase_exp_"+c,layerName)
            arcpy.SelectLayerByLocation_management(layerName,"INTERSECT",wp+"geogs/split_points.gdb/"+a+"_"+c,"#","NEW_SELECTION")
            arcpy.FeatureClassToFeatureClass_conversion(layerName,wp+"geogs/split_geogs_explode_select.gdb",a+b+'_'+c)

I've seen that there's a ST_Intersection and ST_Intersect but I'm not really sure these do what I need ogr2ogr. I need my output to be just the A part of the polygon.

Is there an ogr2ogr equivalent of SelectLayerByLocation?

edit:
I found a blogpost here http://www.gisdoctor.com/site/2012/07/29/statement-spatial-join/

I'm not totally sure if this is the code I want, but I modified mine to this for testing purposes:

ogr2ogr -f "ESRI Shapefile" -sql "select PP.*, SP.* from point PP inner join buffer_clip_exp SP with(Index(geom_sidx)) on PP.geom.STIntersects(SP.geom) = 1" test_out.shp buffer_clip_exp.shp point.shp

And I get this error:

layer names ignored in combination with -sql.
ERROR 1: SQL Expression Parsing Error: syntax error, unexpected reserved keyword, expecting end of string. Occured around :
select PP., SP. from point PP inner join buffer_clip_exp SP with(Index

a caret (^) is below the 'i' in 'inner'


texts: Can leaflet be used to show 360° panoramic images?

texts:
Google's Marzipano makes the task of creating VR tours extremely simple.It is possible to take the Marzipano output and customize it - to an extent.  However, Leaflet with its pleathora of plugins and the ease of creating custom layers offers a far higher degree of customization.  What is not clear to me is whether I can use 360° panoramic images such as this one in Leaflet by somehow specifying the coordinate system and then serving up the right "tiles" from my own server.
Quite apart from the coordinate system and tiling problem it is not clear to me that Leaflet can be made to produce the smooth panning effect that Marzipano delivers.  What for instance happens when you reach 180°?  In a panorama view you want to smoothly transition to show whatever happens to be at/around -180° rather than the tile server serving up a blank "not found" tile.
I'd be most obliged to anyone who might be able to tell me if this is at all possible with Leaflet.


texts: PostGIS: ST_DWithin: Why is the output empy?

texts:
I have just one table of street segments of Berlin (OSM Data, imported using osm2po, SRID set to 25833).
I want my query to output all street segments, that are within a certain distance (e.g. 2000m) of those segments which have the attribute clazz of 11 (motorways).

I've tried this query:

SELECT id, clazz FROM berlin_2po_4pgr WHERE NOT clazz = '11' AND ST_DWithin(
(SELECT geom_way WHERE clazz = '11'), geom_way, 2000);

My output is empty (for any given distance). Why? Is it because of wrong use of the Subselect?


texts: How to tell what is wrong in the network dataset?

texts:
I work in ArcGIS 10.3. I have a network dataset consisting of lines and points. When I run the closest facility in Network Analyst, it works perfectly everywhere but on this particular edge/part of the network. If I solve the two points, the route it creates goes around the area, not the shortest path as it should.
What could be wrong? I checked if there is no gap between vertices.

I read something about Verify and repair connectivity tool but it requires Network Geometry Dataset. Is there a way to fix my network so the shortest routes are found correctly?
Watch the picture bellow for detailed view.


texts: Display information while map is zoomed using OpenLayers

texts:
I have a map being rendered by OpenLayers using GeoServer which is serving maps using PostGIS. In the database for each line feature type (i.e road), I have the name of that road.

I'm looking for a way to display that information while the map is zoomed similar to what we have in Google Maps.

Is this possible in OpenLayers? Can anybody point me to the recommended way of doing this.


texts: How to change font size in table of content

texts: How can i change the font size of layers in the TOC manualy and also with arcpy ?  The default is to small


texts:
I am having trouble installing the Plugin Builder plugin. I am installing it through the plugin manager in QGIS 2.18.0, and getting the following error message:

  Plugin installation failed: Failed to unzip the plugin package. Probably it's broken or missing from the repository. You may also want to make sure that you have write permission to the plugin directory: C:/Users/_myUsername_/.qgis2/python/plugins

I definitely have write permission to this folder, I have tried rebooting and reinstalling QGIS to no avail. I am running the program as administrator.

Since there is no other way (as far as I can tell) of installing the Plugin Builder, can anyone help me trouble shoot this issue?

For reference this is actually true for all Plugins installed through the Plugin manager.


texts: Feature class not visible in geodatabase after running Alter Field in ModelBuilder

texts:
I'm using ModelBuilder in ArcGIS Desktop 10.5.1.
I have a simple model that clips and exports three feature classes, each to their own file geodatabase (law, fire, and ems). The model branches for the fire and ems feature classes both end by using the "Alter Field" to change the name of the field. The law feature class does not require this field name change. The model executes without any errors, warnings, or other messages. But, when I look at the two geodatabases for fire and ems, they appear to be empty (in ArcCatalog). The strange thing is, if I browse into the geodatabases in Windows Explorer, I can see all the of the system tables and I can confirm that they contain the feature classes (by name) that the model created. To pinpoint the issue, I re-ran the same model, but without the last step (Alter Field), and the feature class appears in the geodatabase as-expected.
Below is a clip of a branch of the model:

Below is a clip of the two geodatabases appearing to be empty, even after numerous refreshes within ArcCatalog (I even tried closing an re-launching all ArcGIS sessions):

And below is a view of the apparently empty geodatabases viewed through Windows Explorer, and a system table open in Notepad showing the feature class name highlighted (emsFC):


texts: Accessing HTML Popup in Layer Properties using ArcPy?

texts:
Is it possible to access HTML Popups (found in layer properties) programmatically in ArcGIS Desktop 10.2?

I can't find any reference but thought I'd ask to double check.


texts:
I recently upgraded from QGIS 3.2 to 3.4 using the standalone installer (Windows 64 bit), and uninstalling 3.2 beforehand.  When I open 3.4 it goes the background behind all my other open programs and clicking its icon on the taskbar does nothing, nor does Alt-Tab.  To use QGIS I have to minimize all my other open programs.

Is this a Windows issue, a QGIS issue, or something else entirely?


texts: Replacing text string on layout text element by reading lookup value from table via SearchCursor?

texts:
I'm not sure what the best way is to go about this, but here's my situation:

In short, I exported a domain to a table (and I exported the table as a CSV, too, just in case it might be easier to work with), and I need to be able to reference the descriptions from the table to replace text on a map template in a Python script. I have a layer that has an attribute that is the same as the coded value in the domain, and whenever I replace the template text for that object, it needs to be able to see whatever the code is in the attribute table and replace the generic template text with the corresponding description from the table.

I'm probably butchering my explanation here, so here's an example of what I'm looking for. Let's say this is the table:

Code Description

A Alpha
B Bravo
C Charlie
D Delta

Within my layer, there's an attribute that corresponds to the "Code" in the table, and I used a SearchCursor to make a variable to choose a single record. If it says "A" in the attribute table, I want a code snippet that can see that and select "Alpha" in my exported table (or a CSV or a list that gets created from the CSV, whatever's the most painless!), so I can use that variable for replacing the generic text on a map. (I already have the text replacement code ready, but I just haven't figured out how to read the table. So, if anyone has ideas, please help!)

[EDIT: 8/4/14] Here is the code that I'm stuck on. The first line works and is simply a SearchCursor that gets me the name of an attribute from a feature class. The second line though doesn't work, which is when I'm trying to get the corresponding attribute from a table exported from a domain.

abbreviation = [row[0] for row in arcpy.da.SearchCursor(fc, field_names="myfieldname")][0]
fullname = arcpy.SearchCursor(r"C:\Users\Administrator\Desktop\CurrentProject\mygeodatabase.gdb\myexporteddomain", """ "Code" = '""" + str(myfieldname) + """'""")


texts: Why does compressed & zipped/unzipped file geodatabase give Open Failed Error opening feature class Cannot access secured data?

texts:
In ArcGIS 10.2 for Desktop, a colleague compressed a file geodatabase and then zipped it and sent it to me via email.

I unzipped it and was unable to add any of the feature classes into my map document.

I received this error: "Open Failed. Error opening feature class. Cannot access secured data."

I uncompressed it in ArcCatalog and got the same error when trying to add the data to ArcMap.

This also happened when the colleague zipped the uncompressed geodatabase.


texts: Export CSV file in GEE with random points in polygons as rows

texts:
I'm working with Sentinel 2 data. Currently we have a polygon set with 1000 polygons. I want to choose 100 random points in the polygon set in Google Earth Engine using:

ee.FeatureCollection.randomPoints(Polygon_set)

and generate a csv file as indicated below:

and use it to plot time curves for band values (using Date column). The band values can be calculated using ee.Reducer.mean() or ee.Reducer.max().

Any good ways of making the CSV rows as image number + random points number, and CSV columns as dates and band values?


texts: Automatically generate polygons based on conditions

texts:
Suppose you have two rasters. I would like to create a number of polygons such that each pixel belonging to each polygon fulfilsthe two conditions.

E.g. condition1: rastera > x;
     condition2: rasterb < y

The borders of polygons should be placed where the neighbour pixel to each pixel fulfilling the conditions does not fulfil any of the two conditions. This would allow creating a number of polygons where the two conditions are satisfied.

Do you think this is feasible and could you suggest a methodology?


texts:
I'm still pretty new to GIS, being a new EIT at a civil engineering firm. Im here to find out if ArcMap has this certain projection. If so, how do I access it?

In ArcMap the projection currently says "Lambert Conformal Conic". We need ArcMap to project to Lambert Conformal Conic with Affine Processor which would match our Microstation Coordinate System Properties.

Is there anyway to add this projection? I've attached an image to hopefully help.


texts: GeoServer SLD Offset startPoint/endPoint Along Line

texts:
I would like to symbolize a line with a point graphic at each end AND offset the graphics slightly along the line in order to look something like the following:

The offset is intended to allow the viewer to be able to recognize that all four lines (in this example) have an end (or start) point at this intersection.  If the circle isn't offset, then it will just look like one single circle.
Below is the pointSymbolizer portions of my SLD.  Is there a way to offset the point graphic a few pixels along the line?  The only thing I can think of is to create a graphic PNG myself with a few transparent pixels on the left and then use end/startAngle to rotate it appropriately.  However, I really hope there is a more efficient solution using some SLD magic.
<PointSymbolizer>
    <Geometry>
        <ogc:Function name="startPoint">
            <ogc:PropertyName>Shape</ogc:PropertyName>
        </ogc:Function>
    </Geometry>
    <Graphic>
        <Mark>
            <WellKnownName>circle</WellKnownName>
            <Fill>
                <CssParameter name="fill">#E60000</CssParameter>
            </Fill>
          <Stroke>
              <CssParameter name="stroke">#FFFFFF</CssParameter>
              <CssParameter name="stroke-width">1.5</CssParameter>
          </Stroke>
        </Mark>
        <Opacity>1</Opacity>
        <Size>9</Size>
    </Graphic>
</PointSymbolizer>
<PointSymbolizer>
    <Geometry>
        <ogc:Function name="endPoint">
            <ogc:PropertyName>Shape</ogc:PropertyName>
        </ogc:Function>
    </Geometry>
    <Graphic>
        <Mark>
            <WellKnownName>circle</WellKnownName>
            <Fill>
                <CssParameter name="fill">#E60000</CssParameter>
            </Fill>
          <Stroke>
              <CssParameter name="stroke">#FFFFFF</CssParameter>
              <CssParameter name="stroke-width">1.5</CssParameter>
          </Stroke>
        </Mark>
        <Opacity>1</Opacity>
        <Size>9</Size>
    </Graphic>
</PointSymbolizer>


texts: How to add vector KML data in an excel table

texts:
How do I take a KML (or XML) vector map saved on my desktop showing for example a election ward and then import it into excel as a data input in a field of data.

I have information in excel for Geographical boundaries, but I don't have the data in excel to place next to each field to enable the excel to know how to geocache the data to fill a ward something like this?


texts: Calculating projected distance using ArcObjects?

texts:
I am pretty new to this and I am not sure I understand all the concepts, so I might be using words wrongly or obviously not getting some details right.

We mean to do those calculations within our program using the ArcObjects API. This is an issue related to how to use the ArcObjects API to achieve the desired result

We want to do a proximity search.  From a given point in projected coordinates, I want to look for objects (I think the word in ArcGIS is 'features') within a given distance given in meters (or some other real-world unit).  Keep in mind here that the objects are not contained in an ArcGIS database: we have the objects in projected coordinates in some other, external, list.  All I want is to convert the distance from meters to a projected distance, given in projected units, whatever that is.


texts:
I would like to do some experiments on a traffic forecasting neural network and I need some real traffic data to run the network.

My question is where can I download some real traffic statistics data that shows for example the vehicles rate per hour for several days (100 day or more).


texts: QGIS Mac OSX version cannot batch write output files after rasterization

texts:
I have been trying to batch rasterize a series of .shp files using QGIS for Mac OS X, and keep coming up against a strange problem.

I am using the QGIS 2.6.1 user interface, rather than calling library functions from elsewhere.

Processing->Toolbox lets me right-click on the [GDAL] Conversion->Rasterize (vector to raster) tool, and "Execute as batch process".

After selecting a few test input shape files, the appropriate attribute, defining a pretty low output resolution, and naming the output files, I am able to run the batch process. Everything seems to run perfectly, with no errors or bizarre messages in the log. However, the .tif files do not write. The defined output folder is just empty...

I have tried the same thing on a Windows machine, with the same files and parameters, and it writes the output files no problem.

Has anyone else got experience of this, or may know how to solve the problem?

Perhaps there is a bug in the Mac version. I would much rather get this solved than have to rely on a windows partition.


texts: Latitude-longitude mapping to Shapefiles

texts:
I have an EXCEL spreadsheet with a list of cities, province and Latitude and Longitude.
Example:

I also have a SHAPEFILES of Canadian Federal Election Ridings

I wish to update the EXCEL such that it would identify the Federal riding of the city based upon the Latitude-longitude coordinates
Example of update below.

I suspect that QGIS would have the algorithm to identify federal ridings

The EXCEL has over 30,000 locations.... so automation is a must.

I'm getting BLANK returns. See below
I'm getting:
Major city  latitude    longitude   FED_NUM NID FEDNUM  ENNAME.. .etc
but no mapping of a city to a Federal riding.

When I import the CITY EXCEL file and the Federal riding SHAPEFILE.. i can see the City dots over the various SHAPEFILEs... but it does not connect the City to the riding.


texts:
I am working with some feature classes. I create those feature classes using my add-in. User can add/ delete features from these feature classes clicking on "add", "delete" buttons and selecting features. I added features using following code:

void AddFeature(IFeatureClass featureClass, IGeometry geometry)
{
    IFeature feature = featureClass.CreateFeature();
    feature.Shape = geometry;
    feature.Store();
}

And deleted features using following code:

void DeleteFeaturesWithinPolygon(IFeatureClass featureClass, IPolygon polygon)
{
    List<IFeature> features = GetFeaturesWithinPolygon(featureClass, polygon);
    foreach (var feature in features)
        feature.Delete();
}

Thing is, I did not use editor session. And actually, I did not think about it earlier. but today seeing this question, I think about edit session. I know can do these edits, without edit session. Actually I am doing it right now.