texts: OSM data import error on Windows 2012 server using osm2pgsql

texts:
I am trying to use OSM data using mapserver (ms4w) on windows.
Set up all tools and downloaded data for this purpose.
http://download.geofabrik.de/north-america/us/georgia-latest.osm.bz2
Extracted osm2pgsql(cygwin package) to C:\cygwin\osm2pgsql
Imported OSM data into Postgresql OSM database using(osm2pgsql) the following commands

C:\cygwin\osm2pgsql>SET PROJ_LIB=D:\ms4w\proj\nad
C:\cygwin\osm2pgsql>osm2pgsql -U postgres -l -d osm -p osm -W -E 4326 -H localhost -S "C:\cygwin\osm2pgsql\default.style" georgia-latest.osm.bz2

I am not sure why is it -p osm, anyway it got imported.
Then created mapfile using google.style and run a map successfully on my local PC (windows 7).
But, when I tried the same on my Windows Server 2012 I get the following Errors:

C:\cygwin\osm2pgsql>osm2pgsql -U postgres -l -d osm -P 5432 -W -E 4326 -H localhost -S "C:\cygwin\osm2pgsql\default.style" georgia-latest.osm.bz2
osm2pgsql SVN version 0.85.0 (64bit id space)
Password:(input correct password)

Error: Connection to database failed: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

When I try removing "-H localhost" it gives another error like this:

C:\cygwin\osm2pgsql>osm2pgsql -U postgres -l -d osm -p osm -W -E 4326 -S "C:\cygwin\osm2pgsql\default.style" georgia-latest.osm.bz2
osm2pgsql SVN version 0.85.0 (64bit id space)
Password:(input correct password)

Error: Connection to database failed: could not connect to server: No such file or directory
       Is the server running locally and accepting connections
       on Unix domain socket "/tmp/.s.PGSQL.5432"?

I have checked the following:
Confirmed postgresql 9.4.1 is running on localhost:5432

C:\Users\Administrator>psql -U postgres -p 5432 -h localhost
psql (9.4.1)
WARNING: Console code page (437) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
Type "help" for help.

postgresql.conf contains the following:
listen_addresses = '*'
port = 5432

And
The pghba.conf has got:
# TYPE  DATABASE        USER            ADDRESS                 METHOD
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5
host all all 0.0.0.0/0 md5
#host all all ::1/0 trust

How can I successfully import the osm data as did in local PC?


texts: Creating custom coordinate system in ArcGIS Pro?

texts:
I wish to apply a custom coordinate system to a Map in ArcGIS Pro 1.4.1 and I read at GeoNet that this is not possible (at least up until 1.3.1).

The coordinate system that I wish to create is for GDA 1994 Queensland Albers which is identical to GDA 1994 Australia Albers except for having different central meridian and standard parallel values.

I ran the code below to create an empty feature class with a coordinate system modified from that of GDA 1994 Australia Albers:

import arcpy

arcpy.management.CreateFeatureclass(r"C:\Temp\TestProject\TestProject.gdb", "QldAlbers", "POLYGON", None, "DISABLED", "DISABLED", None, None, 0, 0, 0)

fc = r"C:\Temp\TestProject\TestProject.gdb\QldAlbers"

srAustAlbers = arcpy.SpatialReference("GDA 1994 Australia Albers")
srAustAlbersAsString = srAustAlbers.exportToString()

print(srAustAlbersAsString)

srQldAlbersAsString = srAustAlbersAsString.replace("Australia","Queensland").replace(",132.0",",146.0").replace(",-18.0",",-13.166667").replace(",-36.0",",-25.833333")

print(srQldAlbersAsString)

srQldAlbersAsString = srQldAlbersAsString.split(";")[0]

print(srQldAlbersAsString)

arcpy.management.DefineProjection(fc, srQldAlbersAsString)

Armed with a feature class having my desired custom coordinate system I inserted a new Map into an ArcGIS Pro Project and used its Properties to import the custom coordinate system from that feature class.

All went well except for the warning that:

  Imported coordinate system only contains xy coordinate system.  Only
  the xy coordinate system will be changed.

Despite the warning I think I have created a Map with a valid custom coordinate system, but is this the only way to do it?


texts: Converting shapefile to postgis without giving bounding box

texts:
ogr2ogr -progress --config PG_USE_COPY YES -f PostgreSQL PG:"<myconnection>"
-lco DIM=2 /path/to/myshapefilename.shp myshapefilename -overwrite -lco GEOMETRY_NAME=geom -lco FID=id
-spat 3513207.8,5731702.6 3513579.6,5731962.9 -nlt PROMOTE_TO_MULTI

-spat is defined as

spat xmin ymin xmax ymax:

spatial query extents. Only features whose geometry intersects the extents will be selected. The geometries will not be clipped unless -clipsrc is specified

I want to convert the whole shapefile without limits of a bounding box. Can I do that?


texts: How to convert the SQL result to an array?

texts: I want to  design a popupmenu and I use SQL to find the title I need but I need to convert the table to an array in order to use Title From Variable xxx


texts: Importing CSV file does not show points in QGIS?

texts:
I am currently trying to import a CSV file as a point layer (x and y coordinates are given by the csv file). But when imported, I do not see any points on the map (although the imported layer is active). I tried to reproject the point layer to the correct CRS in order to see it in reference to another linelayer. But then qgis starts to bug and I cannot move the map any more. It keeps jumping to the old position.

Any suggestions on how I can fix this?

I have already successfully imported other csv files prior to that one, so I really can not explain this behaviour.

This is how I import the csv-file with the x and y coordinates:


texts: Calculating distance in ArcGIS for Desktop?

texts:
I am trying to measure straight-line distance from residence to facility. I have both of these locations in latitude and longitude (degrees) in separate layers in shapefiles. These layers indicate which facility each resident went to. I have converted the projection to be UTM (meters). I am trying to measure distance in kilometers and am not sure how to do this. I cannot do a near feature because we cannot assume that all residents traveled to the nearest facility.

I calculated the the hypotenuse of a triangle through a function in excel and have the "distance" in a single number, but this is in degrees, so I am not sure if it can be converted to meters, or if the whole operation should be done differently.


texts: Preventing Excel auto-formatting fractions when exporting from MMQGIS

texts:
I export cable sizes from QGIS via MMQGIS to an excel csv. I have issues with Excel changing values such as "4/0" and "1/0" to dates when I open the exported table. Anyone know of a way to prevent this? In my research it seems that, I will need to change something on the QGIS side of things instead of the excel side of things.

I have tried common excel workarounds such as having the data be " 4/0", "0 4/0", and "'4/0" but these don't work.


texts: Managing environment variables in arcpy?

texts:
The Arcpy documentation seems to suggest that when writing python scripts that utilize/modify variables in arcpy.env, you should wrap everything in a bunch of try/except/(finally) loops with custom error types (which are generally a bad practice, IMO).

In the case here, they don't even guard against errors leaving the extension checked out:

import arcpy
import arcpyproduction

# Check out Production Mapping license
arcpy.CheckOutExtension("Foundation")

# Define map document, data frame, and polygon geometry coordinates
[snip]

# Create polygon geometry
for coordPair in coordList:
    x, y = coordPair.split(";")
    pnt = arcpy.Point(x,y)
    array.add(pnt)
array.add(array.getObject(0))
boundaryPolygon = arcpy.Polygon(array)

[snip]

# Check in extension
arcpy.CheckInExtension("Foundation")

I know that's not a huge risk, but there's got to be a better way, right?


texts: Geoserver 2.14.0 CSS styling - how to force label rendering similar to VendorOption "partials"

texts:
I know that the

<VendorOption name="partials">true</VendorOption>

SLD directive would fix my issue with labels not rendering in my tiles when I want them to and I would add to my SLD style had I written it in SLD format. But I've developed my style directives with CSS.

There are certainly CSS directives that say they do the same as this VendorOption or that VendorOption.

I cannot find documentation of a CSS version of the "partials" vendor option.  Nor any documentation on how to specify an arbitrary "VendorOption" using CSS.

Did I miss it somewhere?  Or is this something to consider adding to the CSS spec?


texts: Saving layer to map document and not layer file?

texts:
I'm trying to write a python script that runs a definition query. I'm having a problem with saving the query directly to a layer in a map document and not as its own layer file. Here is my code:

import arcpy
import os
import datetime

#getting the right layer to modify
mxd = arcpy.mapping.MapDocument(r"U:\FullPath.mxd")
layerName = "BuildingFootprintsCopy"
dataFrame = arcpy.mapping.ListDataFrames(mxd)[0]
print dataFrame
layers = arcpy.mapping.ListLayers(mxd, layerName)
print layers
layerFromMap = arcpy.mapping.ListLayers(mxd, layerName, dataFrame)[0]
arcpy.mapping.AddLayer(dataFrame, layerFromMap, "AUTO_ARRANGE")

#Definition Query
date2 = datetime.date.today() - datetime.timedelta(days=730)
print date2

dQueryVar1 = 'TOTAL_NUMB_FLOORS = ' + "2"
dQueryVar2 = "DATE_BUILT >=" + " date " + "'" + str(date2) + "'"
layerFromMap.definitionQuery = dQueryVar1 + " AND " + dQueryVar2
layerFromMap.save(mxd) #This is the line that throws the error.

print "finished"

This is the error I'm getting:

Traceback (most recent call last):
  File "U:\TestDefinitionQueryWithDate.py", line 35, in <module>
    layerFromMap.save(mxd)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\utils.py", line 182, in fn_
    return fn(*args, **kw)
TypeError: save() takes exactly 1 argument (2 given)

I've tried:

layerFromMap.save(r"U:\FullPath.mxd")

That returns the exact error. I'm not sure why I'm passing 2 arguments instead of 1. I've also tried :

layerFromMap.save()

That returns an error for not specifying a path.

How can I save my layer as the layer in the mxd I ran the definition query on and not as its own path? Can I save it in such a way that there is one layer with all of the data it originally contained with the definition Query on it?


texts: Identifying line intersection for more than 2 lines in QGIS

texts:
I am trying to identify where overlaps exist between multiple shapefiles. I would use the intersect tool, but it only allows me to intersect two layers.
I have over one hundred individual line shapefiles and I want line segments that overlap. Any ideas?
I'm using QGIS 2.0.1 and GRASS for the creation of the shapefiles.


texts: Export all layers of GPKG to Shapefile with QGIS 3.x

texts: Is there a way to export all layers of a GPKG (Geopackage) database to shapefiles in ONE STEP? Or just a selection? It's a lot of work to export all layers one by one.


texts:
I have a problem with leaflet : the control layers are always above everything else in my webpage. Does anyone know how to fix this ?

My code creating the map

var src_str = component.get('v.srcPath');
var grayscale = L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiZGV2aXBsaW5lIiwiYSI6ImNpemZlZDZ2eDAwMDkycWw5OHdkdGNmYngifQ.2dPEOtBRw_koX7fFn2mwaQ', {
    maxZoom: 18,
    id: 'mapbox.light'
});

var streets = L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiZGV2aXBsaW5lIiwiYSI6ImNpemZlZDZ2eDAwMDkycWw5OHdkdGNmYngifQ.2dPEOtBRw_koX7fFn2mwaQ', {
    maxZoom: 18,
    id: 'mapbox.streets'
});

var mymap;
try{
    mymap = L.map(
    'leafletmap', // map's <div> container ID
    {
        center: [47, 2.5],
        zoom: 6,
        layers: streets
    });

    var markersLayer = new L.LayerGroup();
    markersLayer.addTo(mymap);

    var markerRed = new L.LayerGroup();
    markerRed.addTo(mymap);

    var markerOrange = new L.LayerGroup();
    markerOrange.addTo(mymap);

    var baseMaps = {
        "Région": grayscale,
        "Plan": streets
    };

    var overlayMaps = {};
    ol_mark_prefix = "<img style='height:20px;margin-top:0px;margin-left:10px;' src='" + src_str;
    overlayMaps[ol_mark_prefix + "/MapCRI.png'/>"] = markerRed;
    overlayMaps[ol_mark_prefix + "/MapURG.png'/>"] = markerOrange;
    overlayMaps[ol_mark_prefix + "/MapGood.png'/>"] = markersLayer;

    L.control.layers(baseMaps,overlayMaps).addTo(mymap);

    // add the 'Smile.jpg' icon to the control layer
    var controlLayer = document.getElementsByClassName('leaflet-control-layers-toggle')[0];
    controlLayer.style.backgroundImage = 'url(' + src_str + '/Smile.jpg)';

    // because we need these later and can't have global variables in a component, I'll pass them via args !
    var markerArray = [markersLayer, markerRed, markerOrange];
    return markerArray;
}catch(e){
    this.logError(e);
}

Here is my issue

As you can see, both of the control layers are above the context menu of my page, the map being under this context menu. I want the control layers to have the same z-index as the map, so it sticks to it !

Do you know how to do it ?


texts: How to unselect WFS feature using geoextjs2?

texts:
I am using Openalayer 2.12, extjs 4.1 and geoextjs 2. I have created toolbar using geoext js Using link. Now in this link you can find select feature. but i have modified the code as

action = Ext.create('GeoExt.Action', {
    tooltip: "select",
    icon: 'Images/sel.png',
    control: new OpenLayers.Control.SelectFeature(building),
    map: map,
    // button options
    toggleGroup: "tools",
    enableToggle: true,
    group: "tools",
    handler: function() {
                    //alert("Select the feature");
                    ed=null;
                    sm=1;
                }

            });

actions["select"] = action;
toolbarItems.push(Ext.create('Ext.button.Button', action));

Now this code select the layer building now i want to unselect this selected feature on click of other tool in toolbar and code i have

action = Ext.create('GeoExt.Action', {
        tooltip: "Unselect",
        icon: 'Images/unsel.png',
        handler: function() {

                    }

                });
actions["unselect"] = action;
toolbarItems.push(Ext.create('Ext.button.Button', action));

Can any one please help me to unselect the feature in this example


texts:
I am working with spatial data stored in an MSSQL 2012 database as varbinary. I am able to view the spatial data in SSMS with the following query:

SELECT geometry::STGeomFromWKB([column_name], 4955) FROM table_name;

How can I view this data in QGIS? I have successfully connected to the database in QGIS and have tried to run a similar spatialite sql query on the table as a virtual layer, but it does not work.

I have also tried to add the table to the geometry_columns table. QGIS will recognize it as a spatial layer once I drag the table in from the database, but nothing renders. It still shows up as a nonspatial table in the MSSQL connection.

A user with a similar question created a view in MSSQL, but reported that it could not be imported to QGIS.

In SSMS the records look like '0x001110310...'etc., and in QGIS they are all 'BLOB'.


texts: Using Google Encoded Polyline Algorithm Format with Oracle Database

texts:
Google's Encoded Polyline Algorithm Format is implemented in several GI tools. PostGIS e.g. has ST_AsEncodedPolyline and ST_LineFromEncodedPolyline functions.

In contrast, Oracle Database has no corresponding functions. Neither in the Locator module, which is part of the regular license, nor in the Spatial&Graph extension.

Is there an implementation of Google's polyline encoding algorithm for Oracle?

The algorithm is well documented, but not trivial to implement because it uses some bit operations (which are part of nearly every programming language, but not of Oracle SQL resp. PL/SQL).


texts:
Possible Duplicate:
  Sources of realtime spatial data

Wondering if there are any free real time GPS feeds available for consumption. I am preparing a presentation about GIS and I thought a neat demo would be to show a map that updates in real time using this data source.


texts: Using GIS tools for non-geographical problems

texts:
Many other fields have visual/"spatial" problems that can potentially be solved with GIS tools. I know I've used GIS tools for the odd non-geographical task and was wondering how much this happens and if anyone had any good examples of where this has been done.

A example of the kind of thing I'm interested in:

Using geographical information techniques to quantify the spatial structure of endolithic boring processes within sediment grains of marine stromatolites [PDF]

To sumarise the methodology:

A microscope was used to take images of cuttings from Stromatolite's (a type of rock). These images were exported as BMP's and then Erdas Imagine used for a supervised classification. The classifications were exported into ArcView 3.x, cleaned up and suitable classifications converted to polygons. Then they did some spatial selections and some density mapping.

A figure from the paper:

As you can see, I'm seeking problems that use non-geographical data but still have a spatial element. The GIS aspect can be anything: cartography, visualisation, analysis, etc.

Scientific papers/studies are of particular interest, but not mandatory.


texts: Why is QGIS map not sharp when Printing it?

texts:
This is my first project so please bear with me!

I have downloaded the OS StreetView Map and loaded it in to QGIS, the map is 1:10000.

I am running a 27" Mac, but when I view the map on screen at the scale of 1:10000 the details are not sharp. And they are even worse when i print them out.

Is there a step I have missed that somehow sharpens the image on screen - i.e. maybe I have it in some form of "Draft" mode to speed up the processing ?

The project is quite large and will take some time so I want to check that I will get a decent output once I have finished before I spend all of the time doing it.


texts:
I receive lots of Romanian maps with the projection STEREO70 with Datum "S-42 for ROMANIA". I have only found the "Stereo 1970.prj" by ESRI, and when I open the maps with my GIS software the coordinates do not match. As you can see, the PRJ by ESRI does not work with "S-42", but with "Dealul Piscului 1970":

PROJCS["Stereo_70",GEOGCS["GCS_Dealul_Piscului_1970",DATUM["D_Dealul_Piscului_1970",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",500000.0],PARAMETER["Central_Meridian",25.0],PARAMETER["Scale_Factor",0.99975],PARAMETER["Latitude_Of_Origin",46.0],UNIT["Meter",1.0],AUTHORITY["EPSG",31700]]

I don't know if anybody is working with Stereo70 + S42 projection and can share their PRJ.


texts:
I am a new postgis user and I have a simple question.
My intention is to know all point values that not have a line feature near (10 meters of tolerance) How can I do this?

I've tried to find by ST_Dwithin operator, but I need the opposite result. All line features are not within the point radius. Something similar to "not covered by..."


texts: How do I configure MapProxy to show only cache?

texts:
I have local files of the already built cache.  Now I try to configure a layers which gets the cache layer and shows it, but the problem is that I can't make it ignore the original "sources" because it always asks me to specify the source and I don't want it to try get new layers from the server.

layers:
  - name: Earth
    title: EarthA
    sources: [eartch_cache]
caches:
  earth_cache:
    grids:[gm_flat]
    sources: []  #<- I can't do this, although I want something like that

globals:
 cache:
   base_dir: S:\CACHCE

It's not the whole configuration but its the important parts...

Is there any way to make MapProxy work with only cache?

I'm not familiar with MapProxy.


texts: Batch converting ASCII text-files to shapefiles in QGIS

texts:
Here is a sample of my source data.

682575.040,5769613.850,153.410,87
682575.990,5769611.700,153.470,91
682575.850,5769613.340,153.530,95
682580.120,5769612.860,153.480,88
682580.270,5769613.760,153.470,83
682579.430,5769615.690,153.400,90
682577.800,5769628.040,153.450,94
682580.510,5769622.020,153.440,93
682581.370,5769620.100,153.480,86
682582.430,5769617.740,153.530,95

And this is the script I am trying to use but it does not work, any ideas?

import os.path, glob
layers=[]
for file in glob.glob('D:/Projects/RPope/LLPG/Lidar/2007/ascii/test/*.txt'): # Change this base path
  uri = "file:///" + file + "?delimiter=%s&xField=%s&yField=%s&useHeader=no&crs=epsg:28354" % (",", "xField","yField")
  vlayer = QgsVectorLayer(uri, os.path.basename(file), "delimitedtext")
  vlayer.addAttributeAlias(0,'X')
  vlayer.addAttributeAlias(1,'Y')
  vlayer.addAttributeAlias(2,'Z')
  vlayer.addAttributeAlias(3,'code')
  layers.append(vlayer)

Here is the Error message.

Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\code.py", line 90, in run-code
    exec(code, self.locals)
  File "<input>", line 4, in <module>
AttributeError: 'QgsVectorLayer' object has no attribute 'addAttributeAlias'

Appreciate any modifications.


texts: Using timestamp in text format published parameter of FME?

texts:
I have an FME workspace (FME 2015.1) that creates an output file, let's say result.xslx. What I would like to do is to build up the output file name from various parameters, e.g. the project name and the creation date like myprojectname_result_20161017.xlsx.

Obviously, the DestDataset_... published parameters cannot be built in such way using the TextEditor like $(project)_result_@timestamp(yyyymmmdd).xlsx. Promising approach is to build up a text published parameter and use this as a source for the DestDataset_... published parameter.

Where the project name is no problem to achieve, I am not able to access the actual date like described in the above way in creating published parameters. So the problem can be reduced to the question:

In FME, how to automaticaly insert the actual date (timestamp) into a text format published parameter?


texts: Displaying bar legend for point data in ArcMap?

texts:
I often work with large point feature classes that I'm symbolizing with the full 32 classes of graduated colors.

Is it possible to add a simple, horizontal color bar into the legend in such cases (as you might for a raster data)?

This seems like something that other people must want to do, but I'm not seeing it in the 'Style...' menu nor can I find in a search.


texts: Filter out osm data that have been edited after some timestamp

texts:
I want to get data after some timestamp. I have downloaded the osm file of the area. I went through the osmosis documentation but could not find a way to filter it by time.

The result should be same as when we use the timestamp:sometime in JOSM.

I could use JOSM but copy pasting in new layer removes old id, user info and gives new ids, also
i could use the overpass but the area is large and overpass timed out many times
i have also tried osmfilter but it can't filter by time


texts:
I have been using Argis 10.1 and been able to convert polygon m to polygon shapefiles.
I would like to do this with QGIS but I am having difficulty in finding the correct tool to do so.

Please Help


texts: Autochange length of line not working in QGIS 3

texts:
I have the line with calculated length both in meters and in feet.
The problem is, that when I delete some unnecessary nodes it doesn't change at all.

I tried to find some hint here:
Finding line length while editing in QGIS?
but it looks like it applies more to defining the length of the feature instead of auto-changing it.
In my situation, the length has been already calculated, but I need it flexible regarding node editions. Is it possible?


texts: Is there a way to set specific rules when creating a thematic map in MapInfo? I would like to exclude the polygons that have too many of the items I want to represent from the thematic map (something like "restrict dot density map to polygons with population < 10000").


texts: How do I perform mathematic operations on raster data in R?

texts: I downloaded a lot of WorldClim data, but there are some things that I wish to calculate that aren't given by WorldClim, like biotemperature and the aridity index. Biotemperature is definied by adding the mean temperature of each month, excluding months that have an average temperature below 0 degrees celsius, and dividing the sum by 12. Is there any way in R to do this using temperature data from WorldClim?


texts: How to calculate the exact area of three 1 km buffers that have been intersected?

texts: I am trying to figure out the exact area of overlap of the 1 km buffers around three survey posts. I have used the Intersect tool to produce three individual intercepts which cover all the overlap of the buffer (see image below). I then used the merge tool to merge these three individual intersects into one. Then, I used to calculate Geometry to calculate the total area of overlap in km2. However, the area generated was different from what I was expecting. Did creating three separate intersects lead to counting part of the overlap more than once?


texts: Should geometries be drawn using rhumb-line or great-circle paths?

texts:
I work with WGS-84 coordinates and, most of the time, my map display (luciadmap) is in Mercator projection.

My client is surprised to see that, for a rectangular geometry:

the line between the 2 upper points is not straight
the line between the 2 lower points is not straight

N.B: Of course, the 2 upper points have the same latitude, and the 2 lower points have the same latitude.

My client expects to see only straight lines in Mercator. I think that is a wrong expectation. From my point of view, when a geographical zone is drawn on the map, it's sides should be linked by "great-circle" paths (arcs), not rhumb-lines.

Furthermore, all my geographical zones are stored in a Postgres+PostGis database. PostGis function are used to determine if some other geometries intersect with my zones. If I draw my zones using rhumb-lines and intersect using postGis, I fear that some geometries will appear completely outside of my zone. That would seem wrong!

Do you know how PostGis computes it's intersections?
For you, how should geometrical zones be represented on a map?


texts: Conditional calculation of Text field value based on another text field value using ArcGIS Desktop?

texts:
In ArcGIS Desktop 10.1 I created a new field to explain some zoning codes in an attribute Table. I basically want the new field "Zone" to have a string value based on the field "Zoning".

For example if the "Zoning" field value is "AG" then the corresponding "Zone" field should be "Agricultural".

I can do this easily in an Excel Sheet and bring it back to a Layer by a join, But I really want to know if there is a way to do this either with Python or VBScript using the Field Calculator.

The code may be something similar top the one below.

If [Zoning] = "AG" Then
[Zone]= "Agricultural"


texts: Checking layout for compatibility with b/w printing in ArcGIS Pro

texts:
I often have to produce paper maps that would likely later be printed in black and white, is there a way in ArcGIS Pro to apply a visual filter on a map to see how (approximately) the print layout will look like in B/W?
This is to make sure all the layers would not look like the same grey tone.


texts: Bizarre Long, Lat coordinates....don't make sense at all

texts:
I've tried everything I can including all the possible projection transformations....these lng, lat's make no sense.

Here is a sample coord with its disclosed mapping.  The point is in British Columbia, Canada (I'm mapping the BC Wildfires presently underway).

(1302838.303, 517054.973) ----> EPSG_4326 - WGS84

I'm trying to get this to Google Maps projection and plotted....which I know is EPSG 3857.

Here is the source of the data, you can see that they have an actual Google Map with this data plotted, so it's not incorrect.  They even show the

"Extent:  Latitude: 48.0° to 60.0°, Longitude: -139.5° to -113.5°"....but those coordinates make no sense.   I even tried every possible conversion on the epsg.io Transform coordinates tool (http://epsg.io/transform#s_srs=4326&t_srs=3857) and got nowhere.


texts: Using custom xml file with ESRI addin and deployment

texts:
I creating an addin for ArcMap - but my code needs to read from an xml file to generate a dynamic form - I have put the form in the AppData folder as I don't think I can read from an xml file wrapped up in the addin.

So how do you deploy the xml file automatically to the appdata folder when you deploy the addin for users to use?


texts:
I am developing a QGIS-plugin and for graphing I want to use matplotlib, like many other QGIS -plugins.

This worked fine under linux, but under windows with QGIS2.4 I am experiencing problems.

I checked and matplotlib seams to be included in the standard windows-install of QGIS. But when people try to install the plugin, they get this report:

The plugin is broken: No Module named tkinter

Turns out even though I'm using pyqt, matplotlib requires tkinter and this seams be to be excluded from the QGIS installation.

Is this a Bug? (should i report it?)

Or is there a way to use matplotlib without loading tkinter?

If I really need tkinter, how can I solve this? As tkinter is a binary python package, i can't include it in my plugin or is there an alternative (pyQWT is also binary, so also not a solution)

I call matplotlib this way:

from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar
import matplotlib.pyplot as plt

its the experimental version (1.2.0) of this plugin, if you want to try it:
http://plugins.qgis.org/plugins/geopunt4Qgis/


texts: OpenLayers: cache WFS Request for Vector Layer

texts:
In our mobile application, we'd like to use the map offline.

Actually, we don't care about tiles, but we want the user to be able to see some Vector layers.
Here is a piece of code:

            layer = new OpenLayers.Layer.Vector("Block", {
                strategies: [new OpenLayers.Strategy.BBOX()],
                filter: VMMS.GIS.GetBlockFilter(i),
                protocol: new OpenLayers.Protocol.WFS({
                    url: self.urlProxyGeoserver,
                    version: "1.1.0",
                    featureType: "block",
                    featureNS: self.urlGeoserver + self.dataStore,
                    featurePrefix: self.dataStore,
                    srsName: "EPSG:900913",
                    geometryName: "block_geom",
                    schema: self.urlGeoserver + "wfs/DescribeFeatureType?version=1.1.0&typename=" + self.dataStore + ":block"

                }),
                projection: "EPSG:900913",
                styleMap : self.StyleBlockWithOpacity
            });

I would like to be able to load this layer before to be offline, then use it.
I tried to do it, and cache it with localstorage (HTML5), but some problems occurs because of javascript cyclic object.

I could make the request (with url parameter) with my own API, and then cache the response. But I have the feeling that we have to use OpenLayers API.

Otherwise, do you have any idea?

On google, I have only seen solution to cache tiles, but not about my problem.
I'm kind of newbie to Openlayers, so I might have miss something. In that case, I would be happy to know what :)

Thanks

Edit:
By the way, I tried the recommandation there: WFS Caching / Back button
But it's not working (or doesn't match with my needs for some)


texts: I have some .tif raster and .shp mask, and I need to fill values in the raster, which are beyond the mask, with -999. How can I do this using QGIS?


texts: CartoDB adjusting the style of the layer toggle function

texts: The layer names are cut off in the toggle layer function. Is it possible to adjsut the font size or the length of the layer function box so text is not cut off?


texts: Web API cannot derive coordinates from non-numeric matrix

texts:
I am creating an API in R with Plumber which takes in typed coordinates, then using the function below to converts the coordinates to a spatial point for use in the API

def_coord <- function(x, y){
  xy <- data.frame(x, y)
  ll_prj <- "+proj=longlat +datum=WGS84" # set projection
  SpatialPoints(xy, proj4string=CRS(ll_prj))
  return(xy)
}

Here is the parameter argument in the api

#* @param y Latitude in decimal degrees.
#* @param x Longitude in decimal degrees.

On execution, the API returns the error below:

 <simpleError in .local(obj, ...): cannot derive coordinates from non-numeric matrix>

What could be the problem?


texts: How to get started with map overlays and tiles

texts:
I have put quite some time into doing my own research and know in theory what i want to do and some of the steps involved in doing it but I wanted to put this question out to ensure i'm not going in completely the wrong direction and in the hope that some who have trodden this path before might be able to help me avoid some pitfalls.

Target.

I have a need to create a website with an interactive map that will display a base layer of google or OSM (i already have that created)  i then need to overlay a layer that i will create (this is where i need help) and finally server up markers that can be touched (planned to use Mysql and php to build the marker list)

I have a source of Geo TiFFs that i need to stitch together to form a layer and I then need to create tiles from that layer and server it up.  I also have a database of markers

I have several tools GDAL , tilemill, (tried tile map didn't work), QGIS, OpenGEO.

Questions.

Does this sound like the right approach to tackling the problem.
How do i get over the knowledge gap of processing the tiffs into a layer
Should i serve the layer as a sequence of html folders or from a database and if so what does it need to be a GIS.


texts: PyQGIS get existing ComposerAttributeTable from composition?

texts:
Working with QGIS 2.14.10x64 in Windows 7 in the QGIS Python Console

I've managed to create a new print composer from a template, and update the layers in the map, and I'd now like to update the associate Composer Attribute Table. But when I use:

table = printcomposer['QgsComposition'].getComposerItemById('table')

I get a QgsComposerFrame object which doesn't inherit the the QgsComposerAttributeTable methods and can't seem to find any methods to access contents within the frame. Comparing table.uuid() with the uuid in the print composer shows that they are both the same.


texts: Getting attributes from cached service in ArcGIS Online?

texts:
I have cached a service using ArcGIS Server 10.1.  This is from an mxd with 5 very large and dense vector layers.  This is used by a number of desktop users as a mapping service by connecting direclty to ArcGIS Server.  They are able to return the attributes of the features using the "info" button.  I now wish to add this service to an ArcGIS online map where a similar functionality is needed.  Is this possible?

I have tried enabling both wms and wfs as a capability in ArcGIS Server, as well as enabling a "dynamic workspace" however when I add my service to ArcGIS online I am unable to select a feature to view a pop-up window or an attribute table (I have no preference as to which one I want to be able to see).  I do not want the user to be able to edit the data.  I just need them to be able to click on a feature to view its information.

I have also tried enabling "feature access" as a capability in ArcGIS server.  This does indeed allow me to view the attribution, however it changes the styling of my data.  I'm assuming that this only supports basic fills and lines, whereas my data uses patterned fills and lines.

I have also published the same mxd as a non-cached service to ArcGIS online and I am able to click on a feature and get a pop-up showing me the attributes.  All the styling is also kept.

The problem with using a non-cached service is that it is extremely slow because there is so much data.

Am I trying to do the impossible?

I've thought of a workaround which I will try next.  This essentially relies on me publishing 2 services.  The first service would be the cached one with full styling (possibly as a basemap so it's faster).  The second service would be the same non-cahed data with no styling, so you can't see it, over the top.  Essentially a ghost service.  As there is no styling it shouldn't take as long to draw, but the attribution will be there.  From the user perspective they will just see the basemap layer and click on the features on there to see the attribution.

This could work, but it seems a bit of a long winded way as it relies on me publishing 2 services whereas I would like to be able to achieve this using a single cached service.


texts: How to get list of xslt files from geoserver using rest api

texts:
I am trying to get list of all XML and XSLT files from GeoServer using REST API.
I am using path: my_geoserver/geoserver/rest/services/wfs/transforms
and code:
request_url = server + "/geoserver/rest/services/wfs/transforms.xml"
headers = {'Content-Type': 'text/xml'}
auth = ('user', 'pass')

r = requests.get(
request_url,
headers=headers,
auth=auth)

root = ET.fromstring(r.content)

xml_list = []
xml_path_list = []
for xml in root.findall('transform'):
    xml_name= xml.find('name').text
    xml_path= "my_geoserver/geoserver/rest/services/wfs/transforms/" + xml_name + ".xml"
    xml_list.append(xml_name)
    xml_path_list.append(xml_path)

With that code I get list of XML files
How can I get list of XSLT files?


texts: ArcMap tool for for mapping and measuring methane, considering variable parameters

texts:
I have data on 70 methane-emitting plants. For each plant I have the average data of temperature and precipitation between the years 2000-2014. In addition, each plant also has relative humidity, wind speed, and wind direction in the azimuth.  each plant is also fed the total amount of emissions, coordinates and type of plant. So far from what I have found, to show the distribution of spatial pollution on a map, the most appropriate tool is krigging. Is there a tool that can also give weight to wind and humidity data in addition to methane quantities? In order to have a more reliable model according to the different parameters.
I use ArcMap 10.6.1 , can also try in QGIS if relevant


texts: How are service areas created in ArcGIS Network Analyst?

texts:
I want to create a service area map of Burma in order to spot the areas that are within xx kilometers from a set of cities.

The problem is that the generated polygons aren't exactly what I expected.

In order to understand why, I tried to generate service areas on a very simple network where the greens dots are my three facilities :

The first network is a simple triangle. We can see that computing service areas on this shape completely failed.

However, if I complexify a little bit the network by adding edges inside the triangle, it runs smoothly :

In front of these results, I wonder if someone can explain to me how a service area is generated. More precisely, how does ArcMap interpolate the values of the polygons in the areas where there are no streets?


texts: Seeking QGIS plugin for creating buildings?

texts:
is there a plugin for QGIS, which extrudes buildings with sort of random heights and adds a roof on top?

Ideally, the plugin would also put different textures as facades, e.g., having some templates for a small village v a large city.

I'm looking for something comparable to ESRI CityEngine for QGIS.


texts: How do I find the NoData value of a TIFF on a Windows PC?

texts:
How do I find the nodata value of a tiff file on a Windows PC?

I've seen answers for Unix based systems here, but not for Windows.


texts: Folium plugin to reset map to its original zoom level

texts:
Is there a folium plugin that adds a button to the map which on click reset/refresh the map back to its original position?
When a user pan to a different position, he can click the reset button, taking him back to the original map bounds.
An example is this map Home button (this is not a folium map but I am looking for something like this.) https://qgiscloud.com/someone191/EBaseMap/


texts: Downloading layers as shapefile from ArcGIS Online maps?

texts: I would like to download some features in this website. Now I can download ".lyr" file through clicking the apostrophe in the "layer list" (e.g., here). However, the ".lyr" file cannot be exported as shapefile. There is even no such a botton (see the picture below). As a result, I cannot edit it.


texts: How to define the spatial distance ε for EDR and LCSS similarity algorithms?

texts:
Let's assume a dataset with human trajectories like Geolife. I want to measure the similarity of two random trajectories from this dataset using the EDR or/and LCSS algorithm(s).
I wonder, which factors to consider in order to define the value of spatial distance threshold ε used by EDR and LCSS?
I suppose that if I use a different dataset, like Hurricanes or Animals movements, this threshold should be different as the movement pattern is different. The speed of a hurricane is different than the speed of a walking human.
Also, the sampling rate is something to take into consideration?


texts: Compress Large size of satellite image by Open Source GIS software

texts: I have a new challenge to compress large size of satellite image from 59GB to 10GB as maximum size by Open Source GIS software to publish it to GeoServer.


texts:
I am currently working on a way of efficiently displaying information relating to tree inspections (using ArcGIS Desktop to then upload onto arcgis online so that the data can be accessed and added to on the collector app). The end goal is to be able to access all past inspections relating to a tree on the collector app and add new inspections through the app.

I want to form a 1:many relationship class between a point feature (the tree) and inspections.

I know this is possible, however, I am not sure how to format the data I have so that I am able to form the relationship. I currently have 3 years worth of inspection data, but each set of data has its own shapefile layer for trees.

How do I go about formatting the data so that I can create a 1:many relationship?


texts: Adding Vector Data - WFS - can't add multiple features

texts:
I'm trying to add features to my OpenLayers map, by querying a publicly available WFS server which serves GML data.

// initalize the map
var map = new ol.Map({
    layers: [
        new ol.layer.Tile({
            // OpenLayers public map server
            source: new ol.source.OSM()
        }),
    ],
    target: 'map',
    view: new ol.View({
        // center on Murica
        center: [-10997148, 4569099],
        zoom: 4
    })
});

var xmlhttp = new XMLHttpRequest();

// execute this once the remote GML xml document has loaded
xmlhttp.onload = function() {

    console.log("GML XML document retrieved.  executing onload handler:");
    var format = new ol.format.GML3();

    var xmlDoc = xmlhttp.responseXML;

    console.log("you will see multiple features in the xml: ");
    console.log(xmlDoc);

    // Read and parse all features in XML document
    var features = format.readFeatures(xmlDoc, {
        featureProjection: 'EPSG:4326',
        dataProjection: 'EPSG:3857'
    });

    console.log("for some reason only a single feature will have been added: ")
    console.log(features);
    console.log("Why is this?");

    var vector = new ol.layer.Vector({
        source: new ol.source.Vector({
            format: format
        })
    });

    // Add features to the layer's source
    vector.getSource().addFeatures(features);

    map.addLayer(vector);
};

// configure a GET request
xmlhttp.open("GET", "http://geoint.nrlssc.navy.mil/dnc/wfs/DNC-WORLD/feature/merged?version=1.1.0&request=GetFeature&typename=DNC_APPROACH_LIBRARY_BOUNDARIES&srsname=3857",
   true);

// trigger the GET request
xmlhttp.send();

Here is a CodePen with the bug demonstrated.

http://codepen.io/anon/pen/yamOEK

Here you can download it packaged into a single HTML file:

https://drive.google.com/open?id=0B6L3fhx8G3H_cmp1d3hHOXNKNHM

I can successfully download an entire feature collection with multiple features into my variable xmlDoc, using a valid typename. However, when I use format.ReadFeatures(xmlDoc), the OpenLayers GML format parser appears to be only extracting a single feature from the feature collection, whereas it should be extracting many more.

It would be wonderful if someone could take a look and see if they can figure out if I'm doing something stupidly wrong or it's a legitimate bug in OpenLayers3.


texts: OTB Orfeo ToolBox - TrainImagesClassifier ERROR ITK

texts: When i use in QGIS 3.6 TrainImagesClassifier i obtain an error on vector file class :


texts: Create one PDF map of large extent from serval 1:50000 scale sections in QGIS

texts:
I am trying to produce a single PDF map that shows an entire property via several 1:50,000 scale maps stitched together. The scale is important to show the labelled information correctly within my polygons but the property is very large and requires several separate "windows" of 50,000 scale.

Is there a way to export a larger map extent in several 50,000 scale sized portions that are all stitched together. The atlas tool does not seem to accomplish exactly what I am looking for as it bases its separate pages on a polygon feature not on the scale + enlarged canvas extent the way I need it to.

I am utilizing up to date QGIS software.


texts: If i use Cartaro to manage my geospatial data handling website, will it be possible to access other Drupal distributions?

texts: If i use Cartaro to manage my geospatial data handling website, will it be possible to use or integrate other Drupal distributions or modules to customize other sections of my site?


texts: I'm working on georeferencing old maps for archaeological purpose. Of course, colonial maps all do have some degree of transformation needed. But sometimes a specific region is well mapped while the neighbouring one is not. So I wonder if there is a way to calculate the amount of (in)accuracy, or the level to which the original image has been transformed in order to fit the actual landscape? Could a new raster be generated with these values? I'm using QGIS and TPS for georeferencing, but it can be on any platform.


texts: Randomly sampling points in R with minimum distance constraint?

texts:
I'm trying to randomly select a number of points within my data frame (example data below) with a constraint that the minimum distance between the selected point must be greater than a certain distance. I managed to do the randomly selection bit using the sample function in R, but I can't figure out how to add the constraint bit into my code. I suppose this must involve using some spatial analysis package in R but I haven't got a clue where to start.

I know ArcGIS has a tool called Create Random Points which can specify the minimum distance between points. But my situation requires a larger number of repeated sampling, thus making me feel doing this in R would be much easier because it can be incorporated with a loop.

Example data:

grid_index x        y
grid_168   323012.5 674187.5
grid_169   323012.5 674212.5
grid_292   323037.5 672287.5
grid_293   323037.5 672312.5
grid_368   323037.5 674187.5
grid_369   323037.5 674212.5


texts: Importing external bookmark (.dat) files into many MXDs using arcpy?

texts:
Does anyone know any python script to use  for arcview to import a bookmark (saved as a .dat) that was created and saved externally using ArcMap?
I tried with this script but without a result:

import arcpy
from arcpy import env

env.workspace = r"F:\Projects\Roni\abaloa"
for mxdname in arcpy.ListFiles("*.mxd"):
    print mxdname
    mxd = arcpy.mapping.MapDocument(r"F:\Projects\Roni\abaloa\\" + mxdname)
    df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
    arcpy.LoadSettings("F:\Projects\Roni\abaloa\gis\layers\b1.dat")
    for bkmk in arcpy.mapping.ListBookmarks(mxd, 'Bookmark1', df):
        df.extent = bkmk.extent
 mxd.save()
 del mxd

I've also searched all documentation and forums with no luck.


texts:
Can anyone can suggest where I can freely download ArcObjects SDKs for ArcGIS?

I am using version 10.2.


texts: Defining grid for Mapcache for data stored in SRID 3912?

texts:
How do I define the grid for Mapcache when the data is stored in SRID 3912?

<grid name="SLOGRID">
<size>256 256</size>
<extent>413919,90129,694326,133000</extent> -- those are wrong
<srs>EPSG:3912</srs>
<units>m</units>
<resolutions>2000 1000 500 400 200 100 50 25 20 10 9 8 7 6 5 4 3 2.5 2 1.5 1 0.3</resolutions> -- those are wrong
</grid>

Basically I have problems determining the resoulutions and extent.


texts:
I would like to be able to use GPS on my phone, in conjunction with an app, to enable O&M (Orientation and Mobility) support, on my device.

I want the app to tell a blind person walking along a rural carless path by a silent river when they are deciding from the path.

The path is mostly straight, with some bends. I want to know whether, on a clear day, the GPS can detect displacements of two meters. If not, what is the displacement accuracy if GPS.


texts: QGIS Random Points inside a Polygon not creating requested number of points

texts:
I am trying to create 25 random points in one layer with a minimum of 100m between the points.
after putting the information into the 'random points in polygon' tool it has created 80+ points.
I cant figure out what I'm doing wrong.


texts: QGIS 2.0: Date Field for Custom Feature Form

texts:
I see a lot of posts regarding a customizable date field for a QGIS custom feature form such as this one and this one. I cannot bind my fields with a line edit, combo box, nor dateEdit. Is there any known solution to this issue?

This is what happens when I try to with a QDateEdit widget in PyQt Designer and set the widget in QGIS to Calendar. Changing the dateEdit doesn't update the value. The calendar widget successfully opens and sets the date, but it is not at all placed in the correct place on the form.


texts: 0........0.kriging error messages, grid file problem ? (automap, gstat)

texts:
I am trying to conduct kriging of variable called percent in South Africa.
   head(LL12)

     Location Longitude  Latitude   percent
    1       L1  16.48476 -28.60737 1.0000000
    2       L3  16.90045 -29.24154 1.0000000
    3       L4  16.99268 -28.44906 0.6363636
    4       L5  17.06871 -29.67825 1.0000000
    5       L6  17.09935 -29.00169 0.6000000
    6       L7  17.25630 -28.82418 1.0000000

I got the grid as follows:
       SAgrd <- makegrid(SApol_border, n = 1000)
       colnames(SAgrd) <- c('lon','lat')

    SAgrd_pts <- SpatialPoints(coords = SAgrd,
                       proj4string=CRS(proj4string(SApol_border)))

    SAgrd_pts_in <- SAgrd_pts[SApol_border, ]
    plot(SAgrd_pts_in)

# change to shorter name and transform
        SA.grid = SAgrd_pts_in

# transform grid to s.pix.d.f.
        SA.grid=as(SA.grid,"SpatialPixelsDataFrame")

# Ordinary kriging, no new_data object (automap)
# obtain a spdf

        coordinates(LL12) <- ~ Longitude + Latitude
        LL12spdf <- LL12  # indicate the data is a spdf

        krigLL12 = autoKrige(percent~1, LL12spdf)

thus far, good. The above renders a graphic.

However I want to obtain a better graphic where the points are within the frame boundaries/shape of the country. Then I fit a variogram with automap:
    LL12vgm <- autofitVariogram(percent~1, LL12spdf)

Then use the fitted variogram and the grid in ordinary kriging (https://rdrr.io/cran/automap/man/autoKrige.html):
    L12_am_krg = autoKrige(percent~1, LL12spdf, SA.grid)

however I get the following error message:
Error in autoKrige(percent ~ 1, LL12spdf, SA.grid) :
  Either input_data or new_data is in LongLat, please reproject.
   input_data:  NA
   new_data:    +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
In addition: Warning messages:
1: In proj4string(new_data) :
  CRS object has comment, which is lost in output
2: In proj4string(new_data) :
  CRS object has comment, which is lost in output
3: In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum Unknown based on WGS84 ellipsoid in CRS definition,
 but +towgs84= values preserved

Then I tried using gstat and the fitted variogram :
      L12.kriged <- krige(percent ~ 1, LL12spdf, SA.grid, model=LL12vgm$var_model)

and I get the following error message
1 NA
1 "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"
Error in predict.gstat(g, newdata = newdata, block = block, nsim = nsim,  :
  var1 : data item in gstat object and newdata have different coordinate reference systems
In addition: Warning messages:
1: In proj4string(newdata) :
  CRS object has comment, which is lost in output
2: In proj4string(newdata) :
  CRS object has comment, which is lost in output

I would prefer to use the automap for its simplicity.
It looks like I need to reformat the grid file but I cannot figure out how.
I am a novice in these topics.


texts:
I am not so seasoned about gis and geotools, I am trying to encode a feature collection obtained by a shapefile in gml 3.2. Here is my code:

@Test
public void transformAccumuliDiFranaShapeToGml32() throws IOException {
  URL zipfile = Thread.currentThread().getContextClassLoader().getResource("my.shape.zipped");

  File unzippedFile = new File(tmpFolder, UUID.randomUUID().toString());
unzippedFile.mkdirs();
  File zippedFile = new File(zipfile.getPath());
getUncompressed(zippedFile, unzippedFile);
  File shapefile = getFileBySuffix(unzippedFile, ".shp");

  FileDataStore ds = FileDataStoreFinder.getDataStore(shapefile);
  SimpleFeatureCollection features = ds.getFeatureSource().getFeatures();

  Configuration configuration = new org.geotools.gml3.v3_2.GMLConfiguration();
org.geotools.xml.Encoder encoder = new org.geotools.xml.Encoder(configuration);
  FileOutputStream fos = null;
  try {
    fos = new FileOutputStream(new File(tmpFolder, UUID.randomUUID().toString() + ".32.gml"));
    encoder.encode(features, org.geotools.gml3.v3_2.GML.FeatureCollection, fos);
  } finally {
    if (fos != null)
    fos.close();
  }
}

All I can get is an empty gml file. This is the content:

<?xml version="1.0" encoding="UTF-8"?>
<gml:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2"/>

Maybe it depends by the QName value I pass to encoder.encode(..);. You can find the shapefile I used here. What am I missing? I am using org.geotools version 17.2.


texts: Exporting x,y coordinates as latitude,longitude

texts:
I have a shapefile and I loaded it into QGIS using Add vector layer.
After that, I can see points in different positions.
I open the Attribute table and I can see columns "X" and "Y" with values such as (151449.965057, 204642.790761). Now I want to convert them to latitude and longitude. How can I do that?
Therefore, I use the option Save as to export the data to csv format using the CRS WGS 84.
However, nothing changes in the CSV file ("X" and "Y" stay the same as the original data).

I read and tried several suggestions from this forum without help, e.g., Converting x y coordinates to longitude latitude using QGIS?.


texts: How to create a shapefile from xy in .csv file?

texts:
I find many difficult to create a new shapefile in a new project following those steps.

I think the .csv file is correct (there are only: ID, X coord, Y coord) but when I would create the shapefile it gives me an error: "records not imported because of invalid geometry". What does it mean?

I have the same error woth the file downloaded from this sample.

In the picture below you can see the step before the given error:


texts: Creating many parallel lines in ArcGIS Desktop?

texts:
I need to create many parallel lines.

Is there a tool in ArcGIS Desktop where you input the distance between the parallels and the number of them?


texts: How many geodatabases per ArcGIS Server license?

texts:
I need to create and authorize a new ESRI ArcGIS enterprise geodatabase. Our organization has an existing ArcGIS Server license that has already authorized one ESRI ArcGIS enterprise geodatabase. Will I be able to specify the existing ArcGIS Server authorization file to create another enterprise geodatabase within the same organization and network? I would just try except that someone else administers the ArcGIS Server and we are still in the planning stage.

I understand that we will need ArcGIS for Desktop Standard or Advanced (not Basic) to Create an Enterprise geodatabase.

ArcGIS for Server is version 10.0. Our ArcGIS for Desktop Standard is version 10.1.


texts: Ghosting and Map Functionality Loss in Map View C# Arcobjects

texts:
I'm writing a C# add-in and trying to implement a piece where a user can add points to a graphics layer on the map view. The points are drawing, however the map pane has serious ghosting issues and I lose the ability to scroll zoom in and out. I assume the problem is in the way I am refreshing the display. Any input would be great. Thanks,

protected override void OnMouseDown(MouseEventArgs arg)
    {

        base.OnMouseDown(arg);
        IGeometry pointcreate = drawPoint(ArcMap.Document.ActiveView, arg.X, arg.Y); //This creates the point but does not actually place it on screen
        IRgbColor newColor = new RgbColorClass();
        newColor.Red = 128;
        IMap thisMap = getMap(ArcMap.Application);
        addGraphicToMap(thisMap, pointcreate, newColor,newColor); //this actually places the graphic on screen.
        IPoint newPoint = ScrCoordToMapCoord(arg.X, arg.Y, ArcMap.Document.ActiveView);
        ArcMap.Document.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); //This is the refresh in question, I think.

}


texts: Creating and emptying tile doesn't affect tile preview in GeoServer?

texts:
I'm learning to use GeoServer. I'm using its web admin interface. I clicked the tile layer tab, and clicked the empty tab of the layergroup. Based on the GeoServer user manual, this is supposed to remove all saved tiles. But I was still able to see it in preview. I then press the Seed/Truncate tab, and start a new task with "Grid Set" set to "900913", and the rest at default value. I can see tiles is being created from the "List of currently executing tasks". So it seems that tiles were created and tiles were emptied. But the preview works fine in both cases.

Why does it work when there is no tiles?


texts:
I have OSM data in SHP format inside ArcMap 10. But in ArcMap they are stretched a lot East-West compared to what I see at www.openstreetmap.org. How can I change it in ArcMap? I am not looking for transforming the lat/long coordinates.

MapInfo also shows the same SHP file like OSM do it.


texts: Ordnance survey missing counties from boundary line shapefile?

texts:
I would like to make a shapefile of Great Britain's counties.

I have downloaded the boundary-line data from ordnance survey.

When I pull Data/GB/county_region.shp into mapsahper I get this map:

What happened to all the other counties? Scotland, Wales etc. Has anyone else tried using this ordnance survey map, and knows if you can get all the counties for Great Britain?


texts: How to restrict the output parameters in ogrinfo?

texts:
Just want to know, is it possible to restrict the output parameters while using ogrinfo? For example, I need only the Projection details for a bunch of tab files, that too in a single continuous line and not the other details like Field_name etc. -nocount -nomd -noextent are not working. I find it very difficult to reformat the output csv file.

Currently I'am using this code List the tab/shp files properties within folders/sub folders w.r.t relative folder path to extract the information


texts:
I'm pretty new to leaflet and I'm trying to figure out how to use Google Streetview with Leaflet.

What I would like to have is the Google pegman in the right bottom of my map so that I can click and drag it to have the street view :

Can anyone provide me with an example of the Javascript/HTML code that allows to do this ?


texts: Erdas Imagine 2014 - Mosaicing SPOT 6 image tiles with seamless colour generation

texts:
I have several SPOT 6 image tiles and every time I mosaic the images the final image comes out with different colors, with each depicting the various tiles(image scenes) used in the mosaic. The overlapping areas also appear very visible in the image. Even when I apply color balancing and histogram match options, the results doesn't change much and its not even getting better. I also tried using breakpoints to edit the parameters of individual images, yet it still not working.

I have also tried to use ER Mapper to solve the problem, yet it still not working.
Please can any one help with a solution?


texts:
In Openlayers v2 I could get a map from an ESRI server that was not a cached service using code similar to below

var arcims = new OpenLayers.Layer.ArcGIS93Rest("MyName",
    "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export",
    {
        layers: "0,1,2"
    });

How do you do the same using Openlayers v3 I can't same to find the right function in ol.source


texts: Overlaying multiple rasters covering the same area with a single band

texts: I have a data set that contains rainfall values for every 5 mins of a day in different rasters (each raster has rainfall for 5 minutes - ie 12*24 = 288 rasters per day). I want to overlay all the rasters together to get the rainfall for the entire day in one raster. all the rasters cover the same area (the UK). what is the best tool to do this? I have access to both QGIS and ARCGIS, but not sure if mosaicking all the rasters per day will give me the total rainfall, or if I should merge. What is the best way to get the total rainfall per day in raster format? Basically what I want is a functionality that will allow me to overlay all the rasters and sum the values for each overlapping point.


texts: Automatically create local copy of hosted feature service and sync

texts:
does anyone know if its possible to write a python script to automatically create a local copy of a hosted feature service from ArcGIS online in to ArcMap so that it can be modified locally and then synced back to ArcGIS online?
There are no out-of-the-box geoprocessing tools that will create a local copy.
Another solution may be ArcGIS Pro, which hosted feature services can be edited natively. However, i am trying to delete all features/rows within the hosted feature service and append new data.


texts: Incorrectly Projected PostGIS data in TileMill

texts:
When I bring PostGIS data in EPSG:900913 into TileMill, my layers end up on other continents.

This is my workflow:

(1) Save shapefiles in QGIS to EPSG:900913

(2) Import the shapefiles using PostGIS Shapefile and DBF loader 2.0 in pgadminIII
... specify SRID as 900913 in the loader

(3) Add PostGIS layer in TileMill... specify SRS as 900913.

I get this result: https://www.dropbox.com/s/ztw2c03o9r7gv30/tileMill_projection.png

Some notes: I have no problems loading the PostGIS data into QGIS afterwards in the same projection (on-the-fly disabled). I have tried the same process using WGS84 EPSG:4326 & WGS84 / Pseudo Mercator EPSG:3857 with no luck.

My guesses are that either (1) the Extent parameters when Adding PostGIS Layer in TileMill have something to do with this (2) TileMill is not reading my PostGIS spatial_ref_sys table correctly. Any thoughts and/or suggestions?

I'm going to try inserting a new spatial_ref_sys table like here.

Thanks again!


texts: Connecting MapServer to a raster table in PostGIS

texts:
I am new in MapServer and I want to visualize some raster tables in MapServer.

My mapfile is:

MAP
CONFIG "MS_ERRORFILE"  "error.log"
DEBUG 5
NAME "milad"
STATUS on
SIZE 600 600
EXTENT -8321547  5668833  -7583277  6240180
UNITS meters

LAYER
    NAME "poly"
    STATUS DEFAULT
    TYPE RASTER

    DATA "PG:host=localhost port=5432 dbname=geodatabase user=postgres password=**** schema=public table=milad_raster column=st_asraster"

    PROJECTION
        "init=epsg:3857"
    END

    PROCESSING "NODATA=-9999"
    PROCESSING "SCALE=AUTO"

    CLASS
        STYLE
            COLOR 200 0 0
        END
    END
END

END

Then I use this URL to see the map but I see nothing. It is just the white screen.

  http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/milad/milad_raster.map&mode=map

I checked the log files and I saw that the error is:

[Thu Jan 23 15:34:58 2020].675000
msLoadMap(): 0.016s
[Thu Jan 23 15:34:58 2020].675000 CGI Request
1 on process 7144
[Thu Jan 23 15:34:58 2020].675000
msDrawMap(): rendering using outputformat
named png (AGG/PNG).
[Thu Jan 23 15:34:58 2020].675000
msDrawMap(): WMS/WFS set-up and query, 0.000s
[Thu Jan 23 15:34:58 2020].675000
msDrawRasterLayerLow(poly): entering.
[Thu Jan 23 15:34:58 2020].768000 Corrupt,
empty or missing file 'PG:host=localhost
port=5432 dbname=geodatabase user=postgres
password=**** schema=public
table=milad_raster column=st_asraster' for
layer 'poly' ... ignoring this missing data.
Error browsing database for PostGIS Raster
properties
[Thu Jan 23 15:34:58 2020].768000
msDrawMap(): Layer 0 (poly), 0.093s
[Thu Jan 23 15:34:58 2020].768000
msDrawMap(): Drawing Label Cache, 0.000s
[Thu Jan 23 15:34:58 2020].768000 msDrawMap()
total time: 0.093s
[Thu Jan 23 15:34:58 2020].768000
msSaveImage(stdout) total time: 0.000s
[Thu Jan 23 15:34:58 2020].768000 mapserv
request processing time (msLoadMap not
incl.): 0.093s
[Thu Jan 23 15:34:58 2020].768000
msFreeMap(): freeing map at 02648FD8.
[Thu Jan 23 15:34:58 2020].784000 mapserv
total execution time: 0.125s

If you do not want to read that file, just read this one cuz error is here:

  [Thu Jan 23 15:34:58 2020].768000 Corrupt, empty or missing file 'PG:host=localhost port=5436 dbname=geodatabase user=postgres password=**** schema=public table=milad_raster column=st_asraster' for layer 'poly' ... ignoring this missing data.  Error browsing database for PostGIS Raster properties

I can visualize my raster table in QGIS. Thus, I believe it should be correct.
I checked with gdalinfo and I was able to read the raster table.
What is the problem? the URL? the mapfile? or something else?


texts: What are the geocoordinates of elevation data in AW3D30 dataset (correct PixelIsArea interpretation)?

texts:
I am trying to process elevation data from the AW3D30 dataset with Python. I read GeoTIFF files directly without any external libraries like GDAL. Elevation data (raster type) is specified as PixelIsArea.

As I would like to interpolate the elevation between existing points, I would like to know, what are the geocoordinates of the existing points. The accompanying description file (HDR) says they start at (0.5,0.5), but I've seen some references elsewhere (geotiff.maptools.org) saying that PixelIsArea point should be interpreted as (-0.5,-0.5).

To illustrate - if in the following picture point C1 is what I read from the file and the raster type is PixelIsArea, which are the correct geocoordinates of this point: C2 or C3?


texts:
I am using the Mosaic to New Raster tool in ArcMap 10.7.1 to mosaic 4 rasters shown below. I downloaded all of them from the ArcticDEM dataset. They do not overlap and as far as I can tell they have identical properties (32 Bit float, same spatial reference, 32m cell size...) and only vary slightly in the range of pixel values.

When I use Mosaic to New Raster I get the following output. All the values from the top right raster now show as "No Data". I am not sure why this would be happening? Any suggestions?

EDIT: I ended up removing the offending raster and reloading it before running the mosaic tool again, and for some reason it was fine...


texts: Combining multiple year yield data in ArcGIS for Desktop?

texts:
I am using ArcGIS 10.1 for Desktop and trying to find the simplest way to combine multiple year of crops yield data into one file and get the average yield.

The files are point files from a yield monitor.


texts: Garbage truck fleet route optimization using Network Analyst

texts:
I have created a vehicle routing problem for a small 6 x 3 block area and am having issues with longer than expected drive times.

GOAL: To create an optimized route plan for 3 garbage trucks within a specified test area using the Vehicle Routing Problem Solver within Network Analyst.

Process To Date:

I created a topology layer with rules for the data set. The rules include all the points (stop signs, traffic lights, truck end and start locations) must be covered by a line and lines (roads) must not have dangles.
Create a network data set for the roads layer. Within the roads attribute table I have created a new field containing drive time in minutes for each road segment using speed limit and distance. This new field was used within the network data set creation to allow me to use the Vehicle Route Problem solver.
A new Vehicle Route Problem layer was created. All of the appropriate fields (orders, depots, routes, point barriers) were filled in. Pickup location for the orders was set to right side of vehicle and truck start and dump locations were set to either side. Point barriers were set for stop signs and has an added cost of about 4 seconds per stop sign. The orders were filled with centroid points created from a building layer. These points were snapped to the roads layer within the orders options.
The rest of the appropriate information was completed (to my knowledge) such as route properties and order count per truck. There are approximately 200 stops that I tried to split up evenly for the 3 trucks.
After the process was run, I received my 3 completed routes but they did not seem in any way efficient and they seemed to overlap. Some trucks even seemed to stop in the middle of the road and turn around. The total drive time per truck for around 67 houses was around 10 hours.

Here is the completed route system:

What can be changed within my process to allow for a more realistic drive time? I am aware that there may be some issue within my process for I am relatively new to the Network Analyst extension for ArcMap.


texts: ESRI ArcMap ArcObjects C#: Project geometry with user defined transformation

texts:
I have routines which project geometries from the projectedCS DHDN_GK_3 to projectedCS ETRS89_32N using the available predefined ESRI Transformation esriSRGeoTransformationType.esriSRGeoTransformation_DHDN_To_ETRS_1989_8_NTv2 and this works well:

private void ProjectPoint(ESRI.ArcGIS.Geometry.Point pt)
{
    ISpatialReference pSourceCoordSystem;
    ISpatialReference pTargetCoordSystem;
    IGeoTransformation pGeoTrans;
    ISpatialReferenceFactory pSpatRefFact;

    pSpatRefFact = new SpatialReferenceEnvironment();
    // Create the source coordinate system.
    pSourceCoordSystem = pSpatRefFact.CreateProjectedCoordinateSystem( (int)esriSRProjCS4Type.esriSRProjCS_DHDN_3_Degree_Gauss_Zone_3);
    // Create the output coordinate system.
    pTargetCoordSystem = pSpatRefFact.CreateProjectedCoordinateSystem( (int)esriSRProjCS4Type.esriSRProjCS_ETRS1989_UTM_Zone_32N);

    // Create a geographic transformation between the input and output
    // geographic coordinate systems are different.
    pGeoTrans = (IGeoTransformation)pSpatRefFact.CreateGeoTransformation((int) esriSRGeoTransformationType.esriSRGeoTransformation_DHDN_To_ETRS_1989_8_NTv2 );

    // Create a geometry object and project it.
    pt.SpatialReference = pSourceCoordSystem;
    IGeometry2 pGeometry = (IGeometry2)pt;
    pGeometry.ProjectEx( pTargetCoordSystem, esriTransformDirection.esriTransformForward, pGeoTrans, false, 0.0, 0.0);

    MessageBox.Show( pt.X.ToString() + " / " + pt.Y.ToString());

}

Now I would like to use my own user-defined transformation method which I created and saved in ArcMap. So I would have to replace the line

pGeoTrans = (IGeoTransformation)pSpatRefFact.CreateGeoTransformation((int)
esriSRGeoTransformationType.esriSRGeoTransformation_DHDN_To_ETRS_1989_8_NTv2 );

with something like

pGeoTrans = (IGeoTransformation)pSpatRefFact.**Load**GeoTransformation((int)
esriSRGeoTransformationType.esriSRGeoTransformation_DHDN_To_ETRS_1989_8_NTv2 );

This Load function is nonexisting. Any ideas how to do it?


texts: How do I get all geometries within area using Google Maps API info?

texts:
I'm using Google Maps Javascript API. My google.maps.Map object is stored in variable GLOBAL_map. I have the following code:

var bounds= GLOBAL_map.getBounds();
var sw=     bounds.getSouthWest();
var ne=     bounds.getNorthEast();
var lngW=   sw.lng();
var latS=   sw.lat();
var lngE=   ne.lng();
var latN=   ne.lat();
var obj=    {
    lngW: lngW,
    latS: latS,
    lngE: lngE,
    latN: latN
};
console.log(obj);

Here's what obj can look like:

{
  latN: 47.66808688012437,
  latS: 47.637501470799144,
  lngE: -117.40694335937502,
  lngW: -117.43440917968752,
}

I have PostGIS table with a geometry column of multipolygons, SRID 4269. How can I use the info from the Google Maps object to make a PostGIS query that returns rows within the map's north, east, south, and west points?


texts:
using

SELECT Find_SRID('public', 'myTable', 'myColumn');

I get zero as the result, what does it mean?


texts: How to distinguish buildings from vegetation in LIDAR data?

texts: In order to extract the vegetation mask in ecognition, with object base analysis, with creation of the rule sets, the buildings were also classified! Any idea how to extract building from vegetation? I tried to use shape and also asymmetry, but other ideas are most welcome.


texts:
I converted a line shapefile to points as you can see in the attached image. Is there a way to know the coordinates of each point?

I'm using QGIS 1.8.0


texts: Image not Aligning in Google Earth Engine?

texts:
A raster dataset in Earth Engine is not aligning properly to the continent. However, a different raster from the same project database does align properly. This is causing issues for down-stream clipping and exporting. I'm assuming there was an issue reprojecting the source data into Earth Engine.

Can anyone provide insight as to how I can fix this CRS/alignment issue?

I looked into similar issues at Shapefile not projecting properly in Google Earth Engine? and LSIB feature does not align with island boundary in Google Earth Engine? but they are both unresolved and deal with shapefiles, not rasters.

Properly aligned raster (GIMP ocean mask):

Bad projection (GIMP DEM):

// Generate water+ice and DEM layers
var ICE = ee.Image('OSU/GIMP/2000_ICE_OCEAN_MASK');
var DEM = ee.Image("OSU/GIMP/DEM");

var ICEParams = {
  min: 0,
  max: 1,
  opacity: 1,
  palette: ['#0000ff', '#00ff00','#007f30','#30b855','#ff0000','#ffff00','#ffffff']
};
var DEMParams = {
      min: 0,
      max: 2000,
      opacity: 0.5,
      palette: ['#0000ff', '#00ff00','#007f30','#30b855','#ff0000','#ffff00','#ffffff']
    };

Map.addLayer(ICE.select("ice_mask"), ICEParams, "Ice");
Map.addLayer(ICE.select("ocean_mask"), ICEParams, "Ocean");
Map.addLayer(DEM, DEMParams, "Elevation");


texts: Authentification failed when using SentinelHub Plugin in QGIS

texts:
I downloaded SentinelHub v2 plugin into QGIS 3.14.

When I want to log in with my ID (from SentinelHub / Configuration Utility / ID) it says "Authentification failed, check your credentials".
What can I do with it?


texts:
I want to create an atlas legend with the option "Only show items inside current atlas feature". This works fine.

But for the legend title I want a black background. So far, I used a separate item for the title.
When selecting the atlas features dynamically, the legend width is changing as well.

Is there a variable such as width that I could use as width for the title element? Or could I draw only the legend title background black?


texts:
I have this feature class

I would like it to be :

First

Second

Third

Fourth

Unsuitable

Water

No data

The only was I know how to sort it in the Symbology tab is alphabetically. I know I can also rearrange them in the legend in Layout View. Should I put Water and No data in separate layers and label the classes with numbers instead? Or is there away to sort them the way I like?


texts: ArcToolbox Item Descriptions Are All Blank

texts:
I have freshly installed ArcGIS 10.6 on a desktop machine with a new image of Windows 10.  When I open ArcToolbox and right-click on any tool for the Item Descriptions, I am presented with a blank Metadata screen rather than the description.  If I right-click on this blank Metadata screen and go to properties, it points to this incorrect path:
C:/Users/spaine/AppData/Local/Temp/arc8079/tmp186C.tmp.htm

If I actually open a tool, the descriptions are present.  But I am unable to edit the descriptions on script tools I developed because they do not display.  Does anyone have a recommendation on how to fix this?


texts: Adding a feature class to the current ArcGIS Pro map with ArcPy

texts:
I wrote some simple code that created multiple polygons using the Buffer tool.
I will use it in a toolbox and therefore want the outFeatureClass to be automatically added to the current map.
The following code doesn't work. "outcome" is the outFeatureClass I want to add.
pw = r"C:\Users\Main\GIS\Data\ArcGISProject\ArcGISProject.gdb\outcome"
aprx = arcpy.mp.ArcGISProject("CURRENT")
aprxMap = aprx.listMaps("Map")[0]
aprxMap.addLayer(pw)

Running the code in the ArcGIS Pro Python command line I receive an error:
 "ValueError: r"C:\Users\Main\GIS\Data\ArcGISProject\ArcGISProject.gdb\outcome"

The env.workspace for the Python file is set to r"C:\Users\Main\GIS\Data\ArcGISProject\ArcGISProject.gdb".


texts: Where can I find or how can I create my .prm files for MODIS Reprojection Tool?

texts: I am tying to reproject my images into ggrs87 and I can't find a .prm file to do that is there a place where I can find such a file or a document that can guide me through my problem?I also thought that I could just reproject my images to another projection and then, when I am finished with my processes I can reproject them into another projection.


texts: What are the sources for old (1998 or earlier) satellite or aerial photos of the (southern) Netherlands?

texts:
Our municipality says that our garden is too big, according too the cadastre. If we can prove the situation has been already there for twenty years, then they won't charge us for the extra space our garden takes in.

As this is the case, I'm looking to prove this. I have already tried Google Earth and Google Earth Engine, where the first didn't go back enough and the latter wasn't detailed enough.
So I am looking for any source of detailed satellite/aerial photos of the southern part of the Netherlands. They don't have to be free per se, altough it is a pro.

After request: the garden is about 40m² and the dispute is about an area of 10m² therefore 1pixel to 1m² resolution would be sufficient


texts: Set QGIS 3.X additional dependencies in Manjaro

texts:
I am running QGIS 3.10 under Manjaro. I would like to add SAGA and R support to my QGIS tools as described in this thread (Configuring QGIS and SAGA on Ubuntu). The solution described here does not work in my case, however.

I have installed R 3.6.2 and SAGA 7.5.0-2 and activated the latter in the processing options (R does not appear here). However I can't see any SAGA tools in my toolbox.


texts:
The legend symbols in my QGIS map composition render very pixelated, like this:

However, they render fine for actual point data. They appear this way within map composer, when printing, and when exporting to PDF. The symbols are all "Simple marker" types. Is there a setting somewhere to fix this? Been using QGIS for a few years now and can't recall ever having this issue. I'm presenting using QGIS v2.2.0 on Mac OS X 10.9.3


texts: Choropleth map with GeoPandas and Folium error

texts:
I am trying to generate a leaflet Choropleth map as in https://pypi.python.org/pypi/folium.

I am importing a shapefile as a geoDataframe which later on I am converting to a json file that I can input in the folium choropleth function. I am passing the geoframe.geometry field to the geo_path input and a specific geoframe.data to color out the different polygon coming as geometry.

I get this error:

  'File "C:\Python27\lib\site-packages\folium\folium.py", line 606, in choropleth
    geo_data = open(geo_path)
IOError: [Errno 2] No such file or directory: '{"type": "FeatureCollection", "features": [{"geometry": {"type": "Polygon", "coordinates": [[[-8719814.090035686,'

My code:

import geopandas as gpd
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import style
import shapely as sh
import numpy as np
import random
import folium

lotes = gpd.read_file("shapefiles/reProj/Lotes_Datos_epsg3857_SM.shp")
lotes.crs = {'init' : 'epsg:3857'}

geoPath = lotes.geometry.to_json()
data1 = lotes.Area_Total.to_json()

mapa = folium.Map([0, -78], zoom_start=3, tiles='Stamen Toner',API_key='wrobstory.map-12345678')

mapa.choropleth(geo_path=geoPath, data=data1,
    columns=['Lote', 'data1'],
    key_on='feature.id',
    fill_color='YlGn',
    fill_opacity=0.7, line_opacity=0.2,
    legend_name='data1')
mapa

mapa.save(outfile = 'shapefiles/reProj/test.html')

My coding level is beginner.

Any ideas?

shapefile: https://www.dropbox.com/s/ztvcr0qar4870ht/Lotes_Datos_epsg3857_SM.shp?dl=0


texts:
When I import a shapefile as a vector layer the default setting is always applied for the colouring

It's always a simple fill with a stroke width of 0.26. Every time I end up changing it to a simple line with a stroke width of 0.66 and choosing a unique color

If there's any way to make this a default for importing shapefiles that would be a huge time save.


texts: Creating movie from collection of layers with open source software?

texts:
I have a collection of raster layers portraying a certain spatial phenomenon at successive time steps. I would like to create a video from these layers, with the same colour scheme applied on each time step.

The output can either be a video file or something else like an animated GIF.

I am not interested in commercial software. I wish to accomplish this task with open source software.

Many of the tasks in this process are spatial related:

reading/processing a large number of raster files;
applying a single cloropleth to multiple rasters;
applying a same legend to multiple rasters;
automatic production of maps as images.


texts: Opening MXD saved in one version using earlier version

texts: Working in an enterprise system. We need to determine if everyone needs to update to 10.6 at the same time for mxd cross-compatibility or can we update from 10.5 as needed.


texts: Checking all 100 km routes through network for proximity to facilities?

texts:
I am only interested in software agnostic answers to this question.

We're making a coverage analysis where we need to find out which sections of a road network are covered by EV charging capabilities. Initially we did a Service Area analysis in which all sections within 100 km (along a road network) from a charging station are considered covered and the rest not covered.

Thinking about what this means for users, however, lead us to consider the scenario illustrated below.

There, a charging station (filled red) is located along a road (black) less than 100 km from a T-intersection. A car driving along the road passing straight through the T-intersection (along the blue line) will be on a road considered to be covered (red) by the charging network while still not ever having passed a charging station.

To figure out which parts of the street network lacks coverage in a way that's useful to drivers, we're instead considering an analysis in which all possible 100 km routes through the network are checked for adjacency to the charging stations. This will give each point along the road network a degree of coverage depending on the ratio of covered and non-covered routes passing it.

Is there another way to think about the problem?

The network consists of about 500 polylines and there are about 100 charging stations included in the analysis.


texts: How to fill missing high zoom level tiles from MapServer WMS?

texts:
I'm creating image tile pyramids (format = MRF) which do not contain all possible tiles at high zoom levels. This is because in some areas the high zoom level tile does not exhibit higher resolution than a lower zoom level tile. I'm not creating these because the saving in terms of computation time and storage is quite large.

I am serving these MRF files as a WMS using NASA's Onearth software and MapServer. When I make a GetMap request that would return image tiles at an incomplete zoom level, the missing tiles are of course shown as blank.

Is there a setup so that, for such a request, these missing tiles would be filled with portions of tiles from a lower zoom level? Is this something that MapProxy (which I know nothing about) might be able to help me with?

The obvious solution is to generate 'complete' image pyramids but I would lose my considerable savings.


texts: geowebcache-diskquota.xml is not read by geowebcache

texts:
I am using the stand-alone version of geowebcache instead of the geoserver-integrated one.
I wish to set a quota for the amount of space the cache may fill. I have created a geowebcache-diskquota.xml.
Unfortunately the quota does not seem to be enforced. No files seem to be deleted during use and the cache seems to be growing instead of settling at a stable number of files and diskspace.
The documentation was not quite clear on where the geowebcache-diskquota.xml should be placed.

I tried several locations such as the cache of the layer, the diskquota_page_store folder, but also in the WEB-INF and classes folders beneath tomcat.

Can someone please tell me what the exact location is for the geowebcache-diskquota.xml file or whether I should explictly enable diskquotas somewhere else?


texts: How to get fast writing with Geopandas & Fiona?

texts:
I have a GeoDataFrame with 1,2M records, and want to write it into a GeoPackage file. Currently, it takes >20 minutes, and, as I calculated, average write speed is 100 recs/sec.

As I read in the comments, the problem is that Fiona frequently locks and unlocks the sqlite database of GeoPackage.

Is there a way to improve write performance?

building Fiona on the machine?
opening the file in a specific mode?
setting environment parameters for Fiona & GDAL?

QGIS writes the same amount of records about 10 times faster, I'd be happy to see a similar improvement.

My OS is Ubuntu 18.04, but I also have a 18.10 one.


texts:
Can someone explain me the difference between Geocoding and Address Geocoding? Can Geocoding be for anything else other than postal addresses? If so can anyone please provide me with few examples.

I am not able to relate geocoding to anything else other address geocoding.


texts:
I want to combine Landsat bands with the backscatter coefficients of ALOS PALSAR. I used the following code to resample and combine. However, the HH, HV bands in combine image showed with 'masked'. I did Lee filter and converted DB to backscatter coefficient for ALOS PALSAR. The result seems no problem. I don't know what's wrong with my code.

//Resampling
var landsatProjection = imageC.first().select('B2').projection();
print('landsatProjection:', landsatProjection);

HH_HV_2017 = HH_HV_2017
    .reduceResolution({
      reducer: ee.Reducer.mean(),
      maxPixels: 1024
    })
    .reproject({
      crs: landsatProjection
    });

var HH = HH_HV_2017.select("HH")
var HV = HH_HV_2017.select("HV")
var Def = HH_HV_2017.select("Def")

var newproj = HH.projection().getInfo()
print (newproj)

var image_combined = image_selected.addBands(HH).addBands(HV).addBands(Def)


texts:
I have 2 different elevation files, a ALOS GDSM elevation set & a DSM extracted from Corona imagery. Since the Corona file has some inevitable offsets (mainly in z, non-systematic across the area covered), I wonder if there is a method or software available to co-register those 2 DEM files in xyz that doesn't involve python or R.

I know of these 2 examples, but Python is not my strong suite.
https://github.com/dshean/demcoreg
https://www.the-cryosphere.net/5/271/2011/tc-5-271-2011.html


texts: Removing Image Stripes / Scan Line errors

texts:
I have some seabed bathymetry data derived from seismic reflection profiles in a 2.5D dataset (closely spaced lines).

The data was gridded by another worker in SMT Kingdom suite; I'm not familiar with the process, but the result is quite high resolution, but contains scan line errors/striping int he direction of the survey lines.

After some extensive searching via google I'm aware that this can be fixed by using fast fourier transforms (FFT) though I have no idea how to implement this!

I have ArcMap installed on my main desktop machine and would prefer a solution on this, though I do also have GRASS on another machine.

I've attached Images to try and illustrate the problem at hand.

Raw Survey data:

http://imgur.com/tWNUr5t

Inline:

http://imgur.com/ZtDMcxJ

I can't post the crossline image, but it is in the album on imgur


texts:
I'm printing a 11 x 17 map but the QGIS print properties are acting weird. For instance , i set my composition presets to ANSI B (11x 17 in.) and the page setup to 11 x 17 but it prints off a 11 x 17 but only with the print composer wedged in the upper left hand corner. it should just fit to the whole page like my presets suggest.

Any advice? i am stumped.


texts: Selecting by attribute using input file name in for loop

texts:
I have a set of feature classes with naming convention:
abcde_xxxxxxx_abcde.
I also have a shapefile, Mapsheet, with the field "MS" populated with values xxxxxxx.
I would like to loop through the feature classes and clip them using the Mapsheet shapefile where the attribute value xxxxxxx matches the input file name abcde_xxxxxxx_abcde (i.e. where the 7th-13th character of the input filename is the same as the MS field attribute xxxxxxx)

arcpy.env.workspace= "D:/Users/Temp.gdb/Unclipped_Poly_Select/"
select_polys = arcpy.ListFeatureClasses("*ALB_Select_Poly")
print select_polys

for select_poly in select_polys:
arcpy.SelectLayerByAttribute_management ( "D:/Users/MS_20160704.lyr",
                                       "NEW_SELECTION", "[MS] =select_poly[6:13]")

arcpy.Clip_analysis(select_poly,clip_features = "D:/Users/MS_20160704.lyr",
                    out_feature_class =  "D:/Users//Temp.gdb/Clipped_Poly/""IHO1a_" + select_poly[6:13] + "ALB_ICP")

The error I am getting is when trying to select by attribute. I am told that attribute value is not valid.

Can someone please point me in the right direction.


texts: Importing non-geocoded jpeg into active window of ArcMap Data frame?

texts:
Currently when we draw a new subdivision into our GIS, we snip a .jpeg of the platted subdivision and add it to ArcMap. The un-referenced jpeg is simply dropped out in the middle of nowhere and we have to go retrieve it using the 'Georeferencing' tool. We then georeference the corners of the platted map into our GIS and so on and so forth, we draw the map.

For efficiency sake, is there a way to import a non-gocoded jpeg or raster image into the immediate active window of the data frame? It would greatly speed up our efforts if these files could be dropped somewhere remotely close to where their final geocoded location would be.


texts:
I have the following filter in OpenLayers 2.13

var filter_c = new OpenLayers.Filter.Comparison({
        type: OpenLayers.Filter.Comparison.LIKE,
        property: 'p_name',
        value: '%'+document.getElementById("nm").value+'%'
})

I also use GeoServer 2.1.3 and PostgreSQL 9.1 / PostGIS 2.0.

This filter is case sensitive and is applied to a vector layer. I can provide more code if you want.

I try to use ILIKE instead of LIKE but no luck. What am I missing? How can I make this filter case insensitive?

Here is the complete, original code

var filter_c = new OpenLayers.Filter.Comparison({
    type: OpenLayers.Filter.Comparison.LIKE,
    property: 'p_name',
    value: '%'+document.getElementById("nm").value+'%'
});

//pass the filter to the layer
var prot =  new OpenLayers.Protocol.WFS({
    url:  "/geoserver/wfs",
    featureType: "pins",
    featureNS: "http://www.mysite.gr",
    defaultFilter: filter_cl
});

var _CallBack = function(resp) {
    pins.addFeatures(resp.features)
    var cb = pins.features.length;
    if (cb == 0){alert("Nothing Found");}
};

var response = prot.read({callback: _CallBack});

//refresh to render POIs
pins.refresh({force:true});

The pins layer takes data from a table in postgreSQL/PostGIS. This table has id, name, geometry, category, etc.Names are in UTF8 and are in Greek, such as Ακρόπολη, Παρθενώναςetc.

I simply set it like pins = new OpenLayers.Layer.Vector("LayerTitle", {renderers: ["Canvas", "SVG", "VML"]}) and the I have the aforementioned code to search it


texts: Sentinel-2 mosaic (RGB bands) to a country

texts:
Is there a direct way to download a full coverage, actual (2017), cloudless, mosaic of Sentinel-2 satellite imagery to a whole country (with the size like Portugal) ?

If it isn't possible, then can you advise me recipes to do it?


texts: Georeferencing jpg via Gdal_translate output a GIS tif 15.5 times bigger

texts:
Given as input a light 874kb jpg, I use gdal_translate -a_ullr (source) to reinject GIS georeferencing :

  -a_ullr ulx uly lrx lry :
   Assign/override the georeferenced bounds of the output file. This assigns georeferenced bounds to the output file,
  ignoring what would have been derived from the source file

My command being:

gdal_translate -a_ullr 67.0 37.5 99.0 05.0 ./color_hillsades.jpg ./color_hillsades.gis.tif

While the input is .874MB, the output is 13.5MB, or 15.51 times bigger.

Why does it become so huge ?

What to do to keep it light ?


texts: Creating separate shapefiles for each attribute record using loop in ArcPy?

texts:
Line 24 fixed, final code now updated.
Line 22 since fixed , now I get the error
Traceback (most recent call last):
  File "C:\Users\shehn\Documents\ArcGIS\PyScripts\lab6X.py", line 24, in
    arcpy.Select_analysis (inputFile, outSHP, "\"FID\" = '" + each_attribute + "'")
TypeError: cannot concatenate 'str' and 'int' objects

Here is what I tried to do when I looked at the existing way , I got the error : Traceback (most recent call last):
  File "C:\Users\shehn\Documents\ArcGIS\PyScripts\lab6X.py", line 22, in
    outSHP = outDir + each_attribute + u".shp"
TypeError: coercing to Unicode: need string or buffer, int found

import arcpy

#Set OverWrite if files already exist
arcpy.env.overwriteOutput = True

#Set Input Output variables
inputFile = u"C:\\Users\shehn\\Documents\\2018\\LD ARCH 221\\lab 5\\burn2.shp"
outDir = u"C:\\Users\\shehn\\Documents\\2018\\LD ARCH 221\\lab 5"

# Reads My_shapefile for different values in the attribute
rows = arcpy.SearchCursor(inputFile)
row = rows.next()
attribute_types = set([])

while row:
    attribute_types.add(row.FID)
    row = rows.next()

# Output a Shapefile for each different attribute
for each_attribute in attribute_types:
    outSHP = outDir + each_attribute + u".shp"
    print outSHP
    arcpy.Select_analysis (inputFile, outSHP, "FID = {0}".format(each_attribute))

del rows, row, attribute_types

I have to do this in ArcPy, otherwise I would have made a model in Model Builder. I am very new to Python. I think most of my code works, it seems to have an error at the CopyFeatures section. I am trying to get all 20 record in the FID column to become separate shapefiles so I have multiple polygons instead of one. I have tried the solution here "Exporting feature class into multiple feature classes based on field values using ArcGIS Desktop?" but it keeps giving me the expected string but got int error, so I tried doing it this way.

Here is my code:

# import system modules
import arcpy

# set workspace environment
env = arcpy.env.workspace = u"C:\\Users\shehn\\Documents\\2018\\LD ARCH 221\\lab 5\\burn2.shp"

#Set OverWrite if files already exist
arcpy.env.overwriteOutput = True

# Make a layer from the feature class
FC = arcpy.MakeFeatureLayer_management("burn2.shp", "FC")

#Create a list of years to iterate through to enable selection of each year
FIDlist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
print FIDlist

#Initiate Search Cursor to use in loop of attribute values
rows = arcpy.SearchCursor(FC)

for row in rows:

    fieldName = "FID"
    value = row.getValue(fieldName)
    for field in FIDlist:
        Year_layer = str(field) + "_"

        arcpy.MakeFeatureLayer_management(FC, Year_layer)

        arcpy.SelectLayerByAttribute_management (Year_layer, "NEW_SELECTION", "\"FID\" = %s" % (field))

        arcpy.CopyFeatures_management(Year_layer, "fc_" + str(field))


texts: Assign world file to many tiff obtained using a grid/reticulate

texts:
I've many .tiff exported on the base of a grid/reticulate, and now I need to make them georeferenced.

There is an automatic method that allow this using the coordinates of the vertexes provided from the reticulate?

Or other solution?


texts: Works (publicly available) combining LUCAS with other European land data bases?

texts:
EUROSTAT provides the LUCAS dataset, a multi-purpose survey on the state and the dynamics of changes in land use and cover in the European Union.

I wonder if there are any land classification projects (preferably public works), that make use of the LUCAS data base in combination with other (European-wide) geospatial data (remotely sensed or else) and/or land (cover and/or use) data bases.

In particular, I am interested in a nomenclature correspondence between LUCAS and other European schemes.

For examle, an attempt to assess CORINE's thematic accuracy using the LUCAS data set, is described in Fine scale profile of CORINE Land Cover classes
with LUCAS data.