texts: Incorporating Ordnance Survey map with other layers in Leaflet

texts:
I am trying to incorporate the Ordnance Survey layer into my Leaflet map. The goal is to enable it as another map layer amidst a few existing ones.

One of the code looks like this:

 var link = L.Permalink.getMapLocation();
var map = L.map('map',
{
center: link.center,
zoom: link.zoom
});//.setView([52.53, -0.26], 11);
L.Permalink.setup(map);

// https: also suppported.
var osm=new L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png',{
            attribution: '&copy; OpenStreetMap contributors',
    maxZoom: 20
}).addTo(map);;

var OpenStreetMap_BlackAndWhite = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
maxZoom: 20,
attribution: '&copy; OpenStreetMap'
});

var googleSat = L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',{
maxZoom: 20,
subdomains:['mt0','mt1','mt2','mt3']
 });

var trafficMutant = L.gridLayer.googleMutant({
        maxZoom: 24,
        type:'roadmap'
    });
    trafficMutant.addGoogleLayer('TrafficLayer');

var hybridMutant = L.gridLayer.googleMutant({
        maxZoom: 24,
        type:'hybrid'
    });

 //Ordnance Survey map

      var os = L.OSOpenSpace.tilelayer('http://t0.ads.astuntechnology.com/open/osopen/service', {
        layers: 'osopen',
        format: 'image/png',
        maxZoom: 14,
        minZoom: 0,
        continuousWorld: true,
        attribution: 'Astun Data Service &copy; Ordnance Survey.'
        });

    cityfibre = L.layerGroup([Peterboro, Coventry,]).addTo(map);

//layerControl = L.control.layers(null, overlayPane, {position: 'topleft'});
//layerControl.addTo(map);

   var baseMaps = {
"Open Street Map": osm,
"OSM B&W":OpenStreetMap_BlackAndWhite,
"Hybrid":hybridMutant,
"Satellite":googleSat,
"Traffic":trafficMutant,
"Ordnance Survey":os
 };

Unfortunately as a result I am getting only a blank map with OS logo.

I also put another code here
https://jsfiddle.net/Krukarius/ywspqdcb/3/. It is based on the working example: http://rob-murray.github.io/os-leaflet/

However, this example shows only 1 layer, in addition binded in:

  function init() {
  }

which is not familiar with my existing layers.

How to pair this layer into existing ones?

At the end I would like to add, that I am aware of the OS api option. I am just waiting for e-mail conformation.


texts: manage qgis rule based styling duplicates

texts:
I am new to qgis.
When I am using rule based styling, duplicates for some reason show all the matching symbols and not only the first match rule's symbol. How do I make show only one symbol even if it matches more then one rule?


texts: WMS/WFS interface based on layer data stored in ObjectStorage (Swift)

texts:
Currently I am using GeoServer to visualize raster and vector data stored in PostGIS using the WMS interface.

Now we are planning to move to a Cloud-Environment (Cloud Foundry) where no PostGIS extension and no file system are available, but only a ObjectStorage (Swift) where raster and vector data can be stored. I can access those files with an API and REST interfaces. So far as I know this data source is not supported by GeoServer or MapServer.

My question is if someone has an idea how I can use my raster and layer data stored in the ObjectStorage as a data source to provide a WMS interface for data visualization.

Is there any mapserver-software that supports ObjectStorage or any other way to access and visualize the geo data stored there?


texts: How to add a value to a raster in QGIS 2.2 modeler?

texts:
I want to add a plain floating point value as a user input (model input) to a raster.

For example, I want to calculate +4.3 to each cell of the raster.
I remember this can easily be done in ArcGIS using (I think it's called) MathAlgebra.

In QGIS, I cannot find how to achieve it. The raster calculator algorithm doesn't let me reference a single numerical input as can be seen from the screenshot.

Are there other algorithms I can use?
I read in some qgis manual, that you should be able to reference variables from previous calculation outputs, but I have no idea how to do this with a single numerical value.

I use QGIS-2.2.0 Valmiera.

UPDATE:

I updated to 2.8.2 and there is an option, that was also available in 2.2., which is described in the Calculator tool. You can refer to model values by referencing a variable.

I entered +a->float value in the formula field of my Raster calculator step. I am not sure if I got the point how to use it correctly.

I couldn't yet verify because of some error (might be a different problem with my model) the model did not run correctly.


texts: How to transform a PostGIS bounding box?

texts:
I need to query the bounding box of a table (in WGS 84, srid 4326), and transform it to Web Mercator to be consumed by an OpenLayers map.

Currently, I am using this to retrieve the bounding box:

SELECT ST_Extent(geom) FROM mytable

Which returns the string "BOX(2067507.49369776 650368.674310103,2095742.80207396 691604.021270793)". I have tried a variety of ways to transform this, but none have worked.

Transforming the geometry before getting the extent doesn't work:

SELECT ST_Extent(ST_Transform(geom, 3857)) FROM mytable

It returns:

ERROR:  transform: couldn't project point (2.0841e+06 678457 0): latitude or longitude exceeded limits (-14)

Does anyone know what would be causing this error?


texts: Convert a raster to GeoJSON polygons in PostGIS

texts:
I'm trying to convert a raster to a polygon and export it from PostGIS as GeoJSON. Specifically I want each pixel to be a polygon with associated the raster value.

PostGIS seems to have a few different functions for converting rasters to polygons, I'm using the ST_PixelAsPolygons function because I want each pixel to be represented as its own polygon.

Example:

SELECT ST_PixelAsPolygon(rast) FROM tbl;

However this returns a set of records for each raster and I can't easily convert this to GeoJSON.

Does anyone know of a simple way to do this?


texts: clipping polygons (vector) map with a polygon (vector) layer

texts:
A frustrated newbie with QGIS Lisboa version in Windows 7. I want to clip a soil map (multiple polygon vectors) with a single polygon (rectangular polygon vector). The project projection is set at NAD27 UTM 12N. The soil map is Lambert Conformal Conic NAD83 and the clipping rectangular polygon is NAD27 UTM 12N. In the project setting I have checked the box "Allow on the fly transformation.
The operation: Vector --> Geoprocessing Tools -->Clip --> input vector file (the soils)--> clip layer (the rectangle)--> output shalefile (new name)-->OK.
Results: The layers section lists my new file BUT the file does not display and when I click on the file listed and look at the attribute table the FIELDS from the soil map are shown but there are no records in the table.

What am I doing wrong?
What coordinates will the new map be in? That of the soil map or that of the clipping layer?


texts: What is the correct syntax for using gdal_rasterize with a PostGIS datasource

texts:
I have a multipolygon layer in PostGIS and I would like to use gdal_rasterize to generate a raster. I cannot find the correct syntax to specify PostGIS as the data source.

$ gdal_rasterize -a labor_force_2013_12 -l unemployment_by_county PG:'host=localhost user=usernamehere' out.tif
ERROR 4: `out.tif' does not exist in the file system, and is not recognised as a supported dataset name.`

All the gdal_rasterize examples I can find online use a shapefile as the data source but the gdal_rasterize man page says that the src_datasource parameter can be "Any OGR supported readable datasource"


texts: What is issue in this request to Google map engine API

texts:
i want to use the batchInsert of google map engine,
i am calling this with dojo/request

request("https://www.googleapis.com/mapsengine/v1/tables/1453899488279955151311853667273131550346/features/batchInsert",
                    {
                        headers : {
                            "Authorization": 'Bearer '+ token.access_token,
                            "Access-Control-Allow-Origin" : null,
                            "X-Requested-With": null,
                            "Content-Type": "application/json"
                        },
                        handleAs : 'json',
                        method : 'POST',
                        data :datastring
                    }
            ).then(function(data){
                        console.log("Got data :"+data);
                    }, function(err){
                        console.log("Got error :"+err.response.text);
                    }, function(evt){
                        console.log("Got Event :"+evt);
                    });

Request as below

{
"features":[
{"type":"Feature",
"geomerty":
    {
    "type":"Point",
    "coordinates":[-34.678393740116476,150.765380859375]
    },
"properties":
{
"gx_id":"2",
"FID":2,
"sapobjectid":"12345sdf",
"sapobjectname":"Test",
"Features":"Point"}
}
]
}

But i am getting the error as

Got error :{
"error": {
"errors": [
 {
"domain": "global",
"reason": "required",
"message": "A value is required.",
"locationType": "other",
"location": "features[0].geometry"
}
],
"code": 400,
"message": "A value is required."
}
}


texts: Defining parameter descriptions for Python Toolbox help?

texts:
I'm trying to create some Python Toolboxes for our ArcMap application (e.g. MyTool.pyt)

I can see that the help text is defined with the classes self.description attribute.

However, once I run the program, and click into any of the parameter fields, the help/description text goes empty. I would like to be able to provide the description field for each parameter. How is this accomplished?

After some responses, I see that via the 'Item Description' right-click context menu there are many fields that may be populated. Is there a 'pythonic' way to do this? That is, just by embedding some attributes in the .pyt file classes?

For instance, in the .pyt toolbox definition you have the Toolbox class:

import arcpy

class Toolbox(object):
    def __init__(self):
        """Define the toolbox (the name of the toolbox is the name of the
        .pyt file)."""
        self.label = "My Toolbox"
        self.alias = ""

        # List of tool classes associated with this toolbox
        self.tools = [MyNiceTool]

class MyNiceTool(object):
    def __init__(self):
        """Define the tool (tool name is the name of the class)."""
        self.label = "My Tool Class"
        self.description = """
A description that shows up in the help context side pane when the tool is launched.
        """
        self.canRunInBackground = True

    def rest_of_required_methods....

From the self.description string the Tool dialog help window will display this text. However, what I am wanting to do is have a 'description' embedded in my code for each parameter also, so that when the tool is launched, and the user clicks into a parameter field, the parameter description is shown. If I were to do this using the 'Item Description' method referenced in the replies below, I would edit the fields Dialog Explanation under the Syntax section for each parameter... I guess.


texts:
I have a quite complex webapp with a lot of data on a map. Except the basemap, the data of each layers are coming from AJAX queries, witch's responses are formatted as GeoJSON object -- up to this works fine. (Each of this responses -- so each GeoJSON object -- can be more than 1 Mb.)
With checkboxes I'd like to show or hide the datasets.
I prepare each layer in this way: var layer_1 = L.geoJSON(null, { style: style_1, pane: "pane_1" }).addTo(myMap);.
I can add data: layer_1.addData(data_1.responseJSON);.
If I'd like to hide this dataset, is it possible somehow to remove only this dataset from layer_1 (as "opposite" of addData()), or the only way is to myMap.removeLayer(layer_1);, and then create the layer again?


texts: How to get the first point's coordinates of a column with type path

texts:
I have the table above

CREATE TABLE public.geometry
(
    id          serial not null primary key,
    distance    float not null,
    height      float not null,
    coordinates path not null,
    gtype       geometrytype not null
);

trying to make a query like:

SELECT e.id, e.distance, e.height, e.coordinates, e.gtype FROM rf.geometry e WHERE coordinates[0][0] > 10;

I got the error:

ERROR:  cannot subscript type path because it is not an array


texts: ArcGIS Runtime .NET / Setting Viewpoint based on Google Map Co-ords

texts:
I am new to GIS tools.

The following code runs inside a mouse click handler, and should center the map on the given co-ordinate location.

The co-ordinates are taken from Google Maps web view, and my understanding is that 3857 is the spatial reference for these co-ordinates.

Currently, this code moves the map to a very different location and sets the scale to something completely different.

var point = new MapPoint
(
    -37.808934,
    144.975170,
    SpatialReference.Create(3857)
);

var extent = new ViewpointCenter(point, 3000);

MyMapView.SetView(extent);

Does ArcGIS automatically convert the co-ordinates from that space to the maps spatial reference, or is that something I need to do myself?


texts:
We are using Projected Coordinate System: Ain_el_Abd_UTM_Zone_39N (Transverse_Mercator) in our GPS Devices and have valuable Coordinate data.

Can I change the projection of this data this to WGS 1984 and then reproject this to ITRF 2008 in ArcGIS?

If so, what would be the transformation parameters?

This was little urgent, any help greatly appreciated.


texts: Difference between WMS layers and XYZ-Tiles

texts:
When I want to download a basemap that represents my study area, I can use WMS Services or I load a XYZ Tile from lets say OSM.

But where is the difference? Perhaps it's that XYZ-Tiles are always basemaps whereas WMS Services might be Images of texts?


texts: Bottom Scroll Bar, View Selection, and Refresh/Pause Missing

texts: Admins might at first think this is a repeat question, but it isn't. The other question similar to this issue specifies that the bottom scroll bar goes missing in layout view. This problem is occurring in both layout and data view. I have gone to the View menu > Scroll Bars and made sure it is selected. I've even tried deselecting and reselecting it, to no avail. However, if I go into the View menu and select Layout View, the scroll bar appears. Usually, it will remain, but it sometimes will disappear again after a period of time. I'm using ArcMap 10.5.1 on an enterprise system.


texts: In my plugin's directory I've got some XML settings files that I'd like to parse at a particular point during execution of the plugin. Is there a way to get the absolute path where the plugin's .pyc file is located?


texts:
OK: [ Openlayers + ExtJS = GeoExt]

I am new to webmapping and still shopping around. I bumped into a Case Study with a gentle learning curve, matches my needs and it uses OpenGeoSuite. I got to learn of GeoExplorer and I found it to be a neat interface as I intend to serve geodata to gis novices-- some eye candy would be necessary.

I however have issues with the feel of the 'Identify' pop-up box.

My questions:  Is it wise to adopt this 'interface'?

(i) does it have a future - future releases/development (need 2nd opinion after reading http://opengeo.org/technology/geoext/ )

(ii) easy of customisation -- little programming/ scripting experience [ remember 'Identify']

(iii) shall I instead focus on mastering OpenLayers as it is?


texts: How to integrate road networks into Vehicle Routing Problem with Time Windows (VRPTW) algorithms?

texts:
I'm trying to determine how routing software integrate road networks.  Is there a best-practice (or standard) as to what part of the routing solution road networks are inserted specific to Vehicle Routing Problem with Time Windows (VRPTW)?

I've considered the following methods;

Using the network first to determine shortest-path between each and every waypoint, and then performing VRPTW algorithms (large up-front cost as number of waypoints increase)
Building initial populations first, and then using the road network only when executing cost function evaluations (as in the diagram Fig 1, Page 3 of this document)
Executing the full VRPTW solution process and then performing shortest-path calcs only on successive waypoints defined per route sequence.  (sub-optimal, road network not taken into account when evaluating route costs)

Where in the Vehicle Routing Problem (VRP) or VRPTW solving process is the road network accounted for?


texts: Adding unique indexes which start with "A" go up to 99 (A1-A99) and then start again "B1" and continue up to B99 and so on?

texts:
i want to add unique indexes which have to start with "A" go up to 99 (A1-A99) once the 99 rows of finished it has start again "B1" and to continue up to B99, so this index system  has to continue with alphabetic order (A,B,C) with number system (1-99).

How do I do it in the field calculator of ArcGIS Desktop?


texts: How do I choose parameters for the Huff model that best fit my data?

texts:
I'm using the Huff model for some analysis I'm doing. For those not aware, the Huff model is a probabilistic model for retail trade area analysis.

H_ij is the probability that a person at location i will visit a place at location j
A_j is the attractiveness of location j
D_ij is the distance the person at location i is from location j
\alpha is the attractiveness enhancement parameter
\beta is the distance decay parameter

I have a dataset comprised of over two million elements. For each element, I know the person's ZIP code as well as the ZIP code they visited. So, "locations" in this context of the Huff model are ZIP codes. I'm using the number of people that visited a ZIP code as the attractiveness of the location (i.e., A_j).

What I need is a method for estimating the two parameters, \alpha and \beta, from data. How can I determine what these parameters should be?

[edit]
After thinking about this, I realized that this is really an optimization problem. I think the approach I'm going to take is using a metaheuristic global optimization algorithm:

Search will select the \alpha and \beta parameters randomly, according to its rules.
For each entry in the dataset, I select a random number, r. I compute the Huff probability, H, that the person in the entry visited the ZIP code where I know they visited. If r < H, then we got it right.
So, the "fitness" for a particular set of parameters, \alpha and \beta, is the number of cases we get right. This is therefore a maximization problem.
We run this lots of times (because each search is stochastic) with reasonable ranges for \alpha and \beta (something like 0 < \alpha, \beta <= 20), and the winning \alpha and \beta are the ones that produce the maximal fitness.

Does this seem like a reasonable solution?


texts: ArcMap populate field with value from another dataset

texts: I have two Polygon datasets, one contains Buildings and the other PostCodes (ZipCodes). I'd like the PostCode field in the Buildings dataset to be populated with the value of the PostCode field from that dataset.  Using ArcMap 10.2.2 is this possible?


texts: Openlayers Overview - disappearing layers

texts:
when I do this:

    var options = {
        autoPan : true,
        size : new OpenLayers.Size(300, 200),
        layers : this.map.layers,
        mapOptions : {
            allOverlays : true
        }
    };
    var ov = new OpenLayers.Control.OverviewMap(options);

    this.map.addControl(ov);

my layers are only shown in the overview window. The layers disappear from the main screen.

Any suggestions how to fix it?


texts: I have a landuse raster map with integer classes (1:agricultura, 2:pasture, etc). I'm trying to publish it through GeoServer and I'd like to use image overviews to speed things up. I tried gdaladdo with different resampling methods (nearest, average, cubic, mode) but the image looks too pixalated when not zoomed in. The best results I got were with the MODE option. Are there nay other options for working with overviews for thematic raster maps?


texts: Adding multiple selectFeature Controls for multiple layers in OpenLayers

texts:
I am trying to add two different selectFeature controls for two different layers using OpenLayers.

I would like to

display a popup with information about the feature when hover over a feature in vectorlayer1
display a dialog with facilities to do specific operations on feature when a feature is clicked in vectorlayer2
display another dialog  on right click over features in vectorlayer2

I have added my code below and the select feature seems to work only for one layer. It was found working when i tried the same select feature for both layers but it doesnt seem to work when I tried different select feature conrol for both layers.

Here is my code

        var vectorlayer1 = new OpenLayers.Layer.Vector("layer1 Overlay",{
            eventListeners:{
                'featureselected':function(evt){
                    var feature = evt.feature;
                    var popup = new OpenLayers.Popup.FramedCloud("popup",
                    OpenLayers.LonLat.fromString(feature.geometry.toShortString()),
                    null,
                    "
" + feature.attributes.no+"
",
                    null,
                    true
                );
                    feature.popup = popup;
                    map.addPopup(popup);
                },
                'featureunselected':function(evt){
                    var feature = evt.feature;
                    map.removePopup(feature.popup);
                    feature.popup.destroy();
                    feature.popup = null;
                }
            }
        });

        var vectorlayer2 = new OpenLayers.Layer.Vector("layer2 Overlay",{
            eventListeners:{
                'featureselected':function(evt){
                    var feature = evt.feature;
                    layer2_id = feature.attributes.layer2_id;

                    if(layer2_id!=''){

                        var element = document.getElementById('layer2Info');

                        var out = "";

                        out += '/*My html code with different controls for opereations on features goes here*/';
                        element.innerHTML = out;
                        $( "#layer2Info" ).dialog();

                    }

                },
                'featureunselected':function(evt){
                    $( "#dialog" ).dialog('destroy');
                    jQuery('#layer2Info').fadeOut("slow");
                    $( "#layer2Info").dialog('close');

                }
            }
        });

            var hoverSelector = new OpenLayers.Control.SelectFeature([vectorlayer1],{
                hover:true,
                autoActivate:true
            });

            var clickSelector = new OpenLayers.Control.SelectFeature([vectorlayer2],{
                click:true,
                autoActivate:true
            });

            map.addControl(hoverSelector);
            map.addControl(clickSelector);

Only clickSelector for vectorlayer2 is working now. I havnt written code for right click yet. But please tell me how right click is handled in openLayers. Awaiting you reply soon. Please Please Please help!


texts: Changing projection of TIFF in ArcGIS Desktop?

texts:
In ArcGIS Desktop 10.4 I have a TIFF which is projected in WGS84 and displays the whole world, with the center is the Atlantic Ocean.

I would like to display the Pacific Ocean in the center, not the Atlantic Ocean.

But I can't change the coordinate system because I have much more information I'd like to merge with the basemap.


texts:
I have used Grass GIS imported a .shp file; I now want to export this file to MySQL.

I understood that MySQL will contain the function of all three the files necessary in a Shape file system (.shp - .db - .shx). The import works fine but when I try to export to MySQL I get the following error.

ERROR: Unable to open OGR data source 'Test'

At some stage there was also a message that indicated that MySQL or MySQL Spatial is not available.

I have not used QGIS before.  However have purchased GlobalMapper and want to use MySQL instead of Shapefiles. The database is too big to recapture all the info in MySQL I will have to find a way to convert the data from shapefile to MySQL.


texts: Generating an image representing inland surface water using QGis and OSM data

texts:
I'm trying to generate a raster image representing surface water for a given bounding box. I'm using OpenStreetMaps data as my input for water bodies, and I'm using QGis on Ubuntu to process this data. Eventually I would like to be able to take any bounding box as an input, and generate a raster image (2048px by 2048px) that has blue pixels where there is surface water, and black pixels where there is land (or sea; I'm not concerned with ocean water - these can be blue or black). Given that most maps/visualisation tools that use OSM data (such as openstreetmaps.org, Overpass, GeoJSON.io, etc) display inland water as solid blue polygons, I'm sure this can't be too hard to achieve!

At the moment I am trying to do this manually. Ideally this would all be accomplished with free and open source data and software. I intend to create a tool to do this automatically if and when I figure this out. Here is what I have tried:

First I grabbed some OSM data representing inland water using the Overpass API at http://overpass-turbo.eu/ I used the following query:

(
    way["natural"="water"]({bbox});
    rel["natural"="water"]({bbox});
    way["water"="lake"]({bbox});
    rel["water"="lake"]({bbox});
    way["waterway"]({bbox});
    rel["waterway"]({bbox});
);
(._;>;);
out;

I then exported this data in GPX format and imported it as a vector layer into QGis. The lakes are all presented as outlines and the rivers as one-pixel-wide lines. I also imported a simple GeoJSON polygon that represented my bounding box, set it to have a black style, and clipped the other layer to it. I would now like to export the two layers as a 2048x2048 bitmap/png (or similar). I tried to use Raster Menu > Conversion > Rasterize on just the water layer, but this produced a blank raster. I then tried to use the Print Composer as suggested in an answer to this question but this proved to be a lot of work to get it to stretch correctly, and my polygons were not solid but just outlines so I had to fill them in manually.

I must be missing a relatively simple solution here. How can I generate a simple, 2 colour raster image representing surface water for a given bounding box?


texts: Is it possible to get the current position (lat/lng/zoom) in OpenLayers 3 (Like map.getCenter() in Leaflet)? I couldn't find anything in the docs.


texts: How to calculate distance between points on a line in arcgis?

texts:
I created a series of points along a line (as a single feature point), in ArcGIS 10.1. I want to know the distance from one point to the next point along a line.  I would also like to know the simple near distance.

Does someone know how can I do this? The Near or Point Distance tools do not measure distance along a route, only Euclidean distance.


texts:
I'm using ArcMap to draw polygons around some geologic features. I want to know the length of the semi major and semi minor axes of the smallest ellipse that would fit around the polygons.

I'm a new Arc user, so it's possible that there's a simple way to do this, but not that I've yet found. Maybe the buffer tool could do the trick, but I'm not sure how.


texts: Displaying multiple multi-attribute labels for polygons?

texts:
I am using ArcGIS for Desktop 10.2.
I trying to import and display project data for various regions. Each project is tied to a location and I want to display Project Type, Funding Source, and a dollar amount.

I have three data tables in excel.  For the 2 "Acquisitions" tables (the upper left and lower left in the screen shot) I used REGION and NAME to join the 2 tables to a polygon feature class (Town-City-Village).  I had to delete villages with the same names as towns so the individual data entries wouldn't duplicate.

Adding the 2 Acquisition tables: Since they are in separate tables I just made a copy of my polygon feature class and joined each table to it separately - I feel like that is sloppy and I might try consolidating the two Acquisition tables into one.

The "Infrastructure" table (TOP-RIGHT in Screenshot) poses a problem because in that data table there are multiple entries (projects) with a unique funding source, and dollar amount BUT IN THE SAME REGION.

ie.

Region:      Type:               Amount:        Funding Source:
Manhattan    Infrastructure      $1,000,000     CDBG
Manhattan    Infrastructure      $250,000       HMGP

So I'm not sure how to: A. join the infrastructure data and B. Symbolize the information in a succinct way if I even did get it in.

With just the Acquisiton data in the map right now it is already too busy.  I don't know what I'll do when I have to symbolize Infrastructure too. ( SEE OTHER SCREEN SHOT )


texts: How to reproject geodatabase (*.gdb) with datasets and featureclass using custom transformation?

texts:
I have a file geodatabase in arcMap which in in EVEREST_1830 datum and Modified UTM projection.
Now I need to use OpenStreetMap  or googlemaps imagery WMS layer as base layer and overlay the datasets. I know that I can Project each feature class in the Gdb to WGS 84 and do Overlay. But I will take time to project each featureclass. So the short-cut might be to bring the WMS imagery layer to local (.gdb) coordinate system or to bring the .gbd to WGS 84. Is it Possible?

In Short:
Is it possible to project a whole geodatabase including all datasets and feature class (*.gdb) in ArcMap to a another projection system using a user defined custom transformation? Or is there a tool, python script etc...


texts: List counties in current extent using Data Driven Pages

texts:
Maybe I'm just not thinking clearly, but I can't figure this one out.  I need to have a spot on my mapbook pages that says "Counties: " and is automatically filled with the counties in the extent of the current page.  This was SIMPLE with DSMapBook, but I can't seem to replicate it in DataDrivenPages.

Should I just do an intersect and append the new data in a column on my Townships table (Grid layer)?


texts: Is there an easy-to-install website plugin for territory routing?

texts:
For an application I'm creating, I want to be able to place dots on a map in locations that my users will be visiting.

Each user will have his own locations he has to visit, so I'd like to 'connect the dots' so to speak and color in the area inside the connected dots as his 'territory.' This information will be useful for the manager of these users so they he can see which areas are visited & unvisited so that he can better manage where the users need to visit.

(For example, having too many users in the same location might lead the manager to move some to another location so that more area is covered.)

I was looking for some kind of map plugins such as Google Maps APIs, any jQuery plugins, or other easy-to-incorporate library to incorporate in my website, which mostly uses the PHP framework CakePHP and uses jQuery as well. Does this exist anywhere? A simple Google search didn't yield anything impressive.

The closest thing I've found thus far is this: https://developers.google.com/maps/documentation/javascript/examples/drawing-tools

The 'drawing' feature to connect the dots and color the area is perfect - unfortunately I cannot use Google Maps API as it's only free for products that don't charge users, and what I've developing will have a monthly charge. Is there anything similar to this out there?


texts: Referencing Selection in SQL query (where clause) with ArcPy?

texts:
I keep raising errors with my where_clause in the 9th line of this script.  FID is an Object ID field and I want the cursor to select whatever row it is currently pointing at. I don't know how to do this with proper syntax - any ideas?  I am running this on ArcGIS Desktop 10.3.

This is the error:

  Runtime error  Traceback (most recent call last):   File "",
  line 27, in  File "c:\program files
  (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 7211, in
  SelectLayerByAttribute raise e ExecuteError: ERROR 000358: Invalid
  expression Failed to execute (SelectLayerByAttribute).

#Make a layer out of the the original FC
arcpy.MakeFeatureLayer_management(fc, 'Sales_lyr')

#Use an update cursor when there is a value you need to change in the attribute table
with arcpy.da.UpdateCursor('Sales_lyr', ["BOROUGH", "FID", "COUNT"]) as cursor:

 #For every row in the cursor, do the following
 for row in cursor:

      #Select the current row in the UpdateCursor
      arcpy.SelectLayerByAttribute_management('Sales_lyr', "NEW_SELECTION", "FID IN(" + str(row[1]) + ")")


texts: How to associate polygons with the nearest point on a point layer? (Or ... how do I assign a postal area to a salesman?)

texts:
I have a polygon layer of postal code areas and I want to use them to create sales territories based on where our sales people are based. So I assume that I need to work out for each of the polygons which is the nearest point on the sales person point layer. I suppose that I could do this on the nearest part of the polygon or the centroid ... I don't think it would make much difference.

Can someone point me in the direction of what this type of analysis is even called?

Thanks


texts: Comparison of metadata styles available in ArcGIS

texts:
I'm looking for an overview of the differences between the editable metadata styles available in ArcCatalog. Were the diferent styles developed for use by specific groups of users? Are there any advantages/disadvantages of using one style over another? What are the specific differences in the available fields?

Complete answers to these questions might be too lengthy for this forum. A few sentances with links to pertinant resorces would be a great help. The ESRI help is severely lacking in this area (unless I've missed something).

I'm using ArcGIS 10, which seems to have fewer options than earlier versions had, so I'm mainly interested in the four options built into ArcCAtalog, plus the FGDC editor add-in. However, more is always better. Thanks.


texts: Passing the value of runtime variable in WMS request

texts:
I'm trying to make runtime variable inside the where clause of my SQL query like "select geom from table1 where sname = '%s%', but when I'm trying to pass the value of s during WMS request (from the browser over the URL) I'm getting empty result.

Does anyone knows how to make the correct run-time variable definition and WMS request?


texts: Change pane of existing tileLayer in Leaflet interactively

texts:
I'm developing a map application in Leaflet with multiple Layers (Tile-Layer and TopoJSON). I would like a button, which moves the Tile-Layer in front of the other Layers. Therefore I need to put the Tile-Layer into a pane with a z-Index > 400 (see Map Panes). This works fine when initializing the Tile-Layer, but how do I move an existing Tile-layer into another pane in the foreground after having initialised it (change "pane: 'tilePane'" to "pane: 'layerForeground'")?

map.createPane('layerForeground');
map.getPane('layerForeground').style.zIndex = 650;

var SWEmean71_00Apr =L.tileLayer('data/maps/e01_swe/tiles/3857_Mittelwert/{z}/{x}/{y}.png', {
maxZoom: 12,
minZoom: 7,
tms: false,
pane: 'tilePane',
})//.addTo(map);


texts: Removing unwanted attributes from spatial join using ModelBuilder?

texts:
I am new to ArcGIS 10 and am currently building a model. This is a brief rundown of what I am doing at the moment.

I have 2 shapefiles: one a polyline and the other is point data.

I have joined both files using the spatial join tool within the model which created a shapefile that contains the attributes of both files. But I would like to get rid of the attributes obtained from the polyline and retain the attributes from the points since the shapefile has changed to a polyine.


texts: PyQGIS: Using variable instead of number in selectByExpression query

texts:
I am trying to select features of a layer based on an expression that uses the variable jenks_var_sep_minclass. When running it I don't get an error message, but there are also no features selected even though some of their attribute values are in the range that is supposed to be selected.

When I run the code using a number instead of the variable for the expression, everything works well.

# create list of area attributes

area_list = [feature.attributes()[1] for feature in layer.getFeatures()]

# calculate Jenks Natural Breaks and assign second value as variable

jenks_breaks = jenkspy.jenks_breaks(area_list, nb_class=10)
jenks_var_sep_minclass = float(jenks_breaks[1])
print(jenks_var_sep_minclass)

# Select

layer = iface.activeLayer()
layer.selectByExpression('"Area" > jenks_var_sep_minclass', QgsVectorLayer.SetSelection)


texts: How can GeoJson polygons be colored programmatically using OpenLayers?

texts:
I'm experimenting with dynamically setting the color values of a geojson polygon. In my geojson file, there is an attribute for each polygon called pop_den. I am trying to update the fillcolor of the polygon base on the value of an attribute in the geojson file. I have a function getColor() that returns a color, based on the input value.

getColor = function (d) {

    return d > 35000 ? '#800026' :
           d > 30000 ? '#BD0026' :
           d > 25000 ? '#E31A1C' :
           d > 20000 ? '#FC4E2A' :
           d > 15000 ? '#FD8D3C' :
           d > 10000 ? '#FEB24C' :
           d > 5000  ? '#FED976' :
                       '#FFEDA0' ;
}

When I define my StyleMap I am attempting to call this function, so that the appropriate color is set, based on the value of this attribute for each polygon:

var myStyles = new OpenLayers.StyleMap({
     "default": new OpenLayers.Style({
                        fillColor: "${getColor(pop_den)}",
                        strokeColor: "#00FF01",
                        fillOpacity: 0.5,
                        graphicZIndex: 1
                    })
               });

var geojson_layer = new OpenLayers.Layer.Vector("GeoJSON", {styleMap: myStyles});

This does not work, and I am not sure if it is possible to call a function from with the style file using ${getColor(pop_den)}. I also tried fillColor: getColor(pop_den) but I get an error that pop_den is not defined. Can this approach work? I'm not clear on how the StyleMap works exactly when an argument is passed in using ${}.

I am aware of more sophisticated ways of doing this using MapServer, but I am curious to test this approach using small amounts of data to understand what the pros/cons of this approach are.


texts: Merge 30000 polygon shapefiiles in a logical manner in ArcGIS model Builder

texts:
I have 30000 shapefiles (a1.shp to a30000.shp). They are all polygons. Each polygons has one and only one polygon feature in it. I need to Merge the polygons into 1000 shapefiles. My output would be 1000 polygons (each with 30 sequential polygons in it)

So output b1.shp = Merged polygons a1.shp to a30.shp

So output b2.shp = Merged polygons a31.shp to a60.shp

So output b3.shp = Merged polygons a61.shp to a90.shp

and so on up to...

b1000.shp = Merged polygons a29970.shp to a30000.shp

Looking for an ArcGIS model builder or GDAL solution.


texts:
In my stand-alone QGIS app I am using vrt files of DTED rasters. All vrt files are build with the same Python code and have the same structure, codepage etc. I use them for display only.

<VRTDataset rasterXSize="121" rasterYSize="121">
  <SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]</SRS>
  <GeoTransform> 4.0995833333333330e+001, 8.3333333333333003e-003, 0.0000000000000000e+000, 2.7004166666666666e+001, 0.0000000000000000e+000,-8.3333333333333003e-003</GeoTransform>
  <VRTRasterBand dataType="Int16" band="1">
    <Metadata>
      <MDI key="STATISTICS_MAXIMUM">1401</MDI>
      <MDI key="STATISTICS_MEAN">1000.386039205</MDI>
      <MDI key="STATISTICS_MINIMUM">818</MDI>
      <MDI key="STATISTICS_STDDEV">97.464262339239</MDI>
    </Metadata>
    <NoDataValue>-3.27670000000000E+004</NoDataValue>
    <SimpleSource>
      <SourceFilename relativeToVRT="1">DTED/E041/N26.dt0</SourceFilename>
      <SourceBand>1</SourceBand>
      <SourceProperties RasterXSize="121" RasterYSize="121" DataType="Int16" BlockXSize="1" BlockYSize="121" />
      <SrcRect xOff="0" yOff="0" xSize="121" ySize="121" />
      <DstRect xOff="0" yOff="0" xSize="121" ySize="121" />
    </SimpleSource>
  </VRTRasterBand>
</VRTDataset>

It happens, that some vrt files get changed in the way, that the line <GeoTransform>...</GeoTransform> is deleted! And sometimes in the lines beginning with <MDI the decimal dot is changed to a comma. Both happen independently from another.

This is true for only some vrt files, but when it happens then always the same files are affected. I pasted the missing line back into the vrt files (or build them new), and after some QGIS ups and downs, the same effect takes place.

I am having this problem with QGIS 2.8.2 on CentOs 7 using German language settings. Any ideas what's going on here? Or what additional information I should supply to find a solution?


texts: How to add color-map scale in Google Earth Engine?

texts: I want to add a colormap scale like below in my Earth Engine app. I cannot find a UI component for this. Can I do this in any other way in Earth Engine?


texts: Spatial operations between WMS geometry and client data

texts:
I am using geoserver WMS service to visualize some geometry on the map (via Leaflet) which is working fine. Now I have a requirement to perform the spatial operation (say intersects) between two geometries:

coming via WMS service of GeoServer
some client data geometry

The result has to be shown on the map.

What methodology should i use? Note: I cannot use WFS service for geometry(1).


texts:
I am able to launch exe files from within QGIS actions without any problem, but when I try to launch one in particular (img2pdf.exe) I get an error.

  Syntax error: invalid syntax

The command I am issuing is os.system("c:/img2pdf/img2pdf.exe"). Using that same format can successfully invoke other other exe.

If I open a command prompt and paste the exe file path into it, the application launches as expected.

What is the difference between launching from within a QGIS action and launching directly from the command line that could be causing img2pdf to fail?

Windows 10, QGIS 2.18.9-1.


texts: ArcGIS javascript - update a queryTask result on extent change

texts:
I have an application that runs a queryTask on a map service layer and returns various feature results in a div when they click on a table of contents. However, I'd like it to automatically update when the user zooms in or out of the current map extent - is this possible to do by amending the queryTask code?
My code at the moment:

function addFields(layerURL, layerids, fields) {
         var mapExtent = map.extent;
         var currentScale = map.getScale();

         if (currentScale > 200000) {

             $('#show2').empty();
             $('#show2').html('No data at this scale. Zoom in to view data');
             $('#show3').empty();
             $('#show3').html('No data at this scale. Zoom in to view data');

         } else {

             $('#show3').empty();

             //query the fields in extent
             var query3 = new Query();
             query3.returnGeometry = true;
             query3.outFields = [fields];
             query3.geometry = mapExtent;
             var queryTask3 = new QueryTask(layerURL + '/' + layerids);

             //resultItems.push("Before process");
             queryTask3.execute(query3, function (results3) {
                 ////resultItems.push("Before");
                 if (results3.features.length < 1) {
                     $('#show2').empty();
                     $('#show3').empty();
                     $('#show3').html('No results are available in this area, zoom out to explore further...')
                     $('#show2').html('No results are available in this area, zoom out to explore further...')
                 } else {

                 for (var k = 0; k < results3.features.length; k++) {
                     //debugger;
                     for (var j = 0; j < fields.length; j++) {

                         var checkForLink = results3.features[k].attributes[fields[j]];

                         if (checkForLink.indexOf('http://') == 0) {
                             $('#show3').append($('Find out more...'));

                         } else {
                             $('#show3')
                             .append(checkForLink);
                                }
                         $('#show3').append($('
'));
                     }

                     $('#show3').append($('
'));

                 }
                }
             });


texts: What is faster - a matrix, raster or a dataframe?

texts:
I have rasters over which I am performing mathematical operations. For example, where I need to calculate flow distance or distance between two grid points.

What format is generally considered faster for such operations?

Should I work directly on the raster format, instead?

I also converted the data to matrix and dataframe

as.matrix and as.data.frame

The raster has entirely numeric values.
Not sure which is faster. I am new to raster package in R, and I have mostly only worked in dataframes.


texts: Clipping between features within a single vector?

texts:
Is it possible (via the Qgis API and friends), to clip polygonal features within a single vector layer?

The hope is to accomplish this without having to duplicate the feature into a new layer.  Brief experimentation with the processing.runalg("qgis:clip"...)  command only showed me capabilities to accomplish such between multiple layers rather than multiple features WITHIN one layer.

Thanks!


texts: How to release last row of recycling cursor

texts:
I have a recycling cursor which returns a bunch of features from a featureClass:

while((feature = cursor.NextFeature) != null)
{
    // do something with the feature
}

As ArcGIS will use the same COM-objekt again and again when setting recycling to true I don´t need to release this com-object within my loop.

However when the last iteration executes the COM-object will stay alive as it is not overriden by a new feature. But as feature is null we don´t have a reference to this object making it impossible for us to release it.

So how do we release the (only) COM-object when using a recycling cursor? Of course I could count the features returned from the cursor beforehand and increase a counter in my loop indicating if we´re handling the very last one or not. But I find this quite annoying and in particular overkill as it queries the DB unneccessarily.

Also calling GC.Collect seems odd to me as MSDN cleary states explicitely calling the GC is not recommended as it is quite time-consuming.


texts: Cannot use Attributes with special Characters in the Popup content template

texts:
I tried to use an Attribute with an '@' in its name in the Popup content template, and it just displayed the query. I also tried to use other special Characters like '!', '$', '/' etc. Only a colon worked.
My Popup Content template looked like: Accessibility: {@accessibility}
I also tried to escape the @, but it didn't work.
Is there a way to bypass this?


texts: qspatialite error compiling Qgis 1.8 (linux debian squeeze)

texts:
I tried to compile Qgis 1.8 in linux debian squeeze (following the instructions in INSTALL.txt). During 'make' I get the following error:

[ 40%] Building CXX object src/providers/spatialite/CMakeFiles/spatialiteprovider.dir/qgsspatialiteprovider.cpp.o
/usr/local/qgis-1.8.0/src/providers/spatialite/qgsspatialiteprovider.cpp: In function ‘bool initializeSpatialMetadata(sqlite3*, QString&)’:
/usr/local/qgis-1.8.0/src/providers/spatialite/qgsspatialiteprovider.cpp:4972: error: ‘spatial_ref_sys_init’ was not declared in this scope
make[2]: * [src/providers/spatialite/CMakeFiles/spatialiteprovider.dir/qgsspatialiteprovider.cpp.o] Error 1
make[1]:  [src/providers/spatialite/CMakeFiles/spatialiteprovider.dir/all] Error 2
make: ** [all] Error 2

Any help to solve this?

Oscar


texts: Open source equivalent of Esri story maps?

texts:
I am currently interested in story telling with Maps. Esri offers a tool and this is a great example of what I am looking for.

However, I do not own ArcGIS Online because I am not an Esri user.

Do you know a story maps equivalent product written using Open Source?


texts:
I'm currently trying to implement a distributed cost-distance algorithm, however I can't seem to invent my own and still make it fast. I've been googling around a bit but haven't found anything that would allow me to compute the cost-distance for a tiled raster in a "map-reduce" manner, e.g. that would run efficiently on Apache Spark. Does anybody have any good papers or reference implementations of this?

I'm working on GeoTrellis (https://github.com/geotrellis/geotrellis) In Scala, we have are using our own raster-processing library. I'm looking for papers essentially in this question.


texts: How to move geolocation in OpenLayers 5 programatically

texts: My geolocation in OpenLayers is incorrect by more than 5000 meters. I want to correct this issue, how can I programatically move my geolocation to the most accurate location? Or is it even possible?


texts: Imported KML Feature won't display in Earth Engine map

texts:
I have converted a shapefile polygon to a KML file using QGIS, and now am trying to import it to a Google Earth Engine feature table to clip some NDVI difference analysis I'm conducting, but I can't get the polygon to display in the GEE map.

The link to the KML polygon is here: https://www.google.com/fusiontables/DataSource?docid=1b_lTfxp3ne0PBN_BRG7MgbWLG0dlyjMtWjWF0EEf

And the code I'm using to try to display it is here:

// display Leyte province, Philippines
// data from: http://www.philgis.org/freegisdata.htm

var leyte = ee.FeatureCollection('ft:1b_lTfxp3ne0PBN_BRG7MgbWLG0dlyjMtWjWF0EEf');

Map.addLayer(leyte, {'color':'00FF00'});
Map.setCenter(124.65087, 11.0544296, 8);

I think there might be an issue with the geocoding that's keeping it from displaying, but can't identify the issue.


texts:
Is it possible to permanently change the order of columns of shapefiles and other data formats like geopackage within qgis?

I have tried to do so using the settings in layer properties. but this setting only applies to the current qgis session and is not actually coded into the shapefile itself. Table manager is too risky since it often destroyed my data.


texts:
Geopandas

Reading a shapefile with GeoPandas and printing its total bounds:

dataframe = gpd.read_file('example.shp')
print(dataframe.total_bounds)

Prints: [ 663590.5817 1541419.8307  724630.0589 1595869.4839]

PyQGIS

Doing the same with PyQGIS:

QgsApplication.setPrefixPath("/usr", True)
qgs = QgsApplication([], False)
qgs.initQgis()
layer = QgsVectorLayer('example.shp', 'layer1', 'ogr')
print(layer.extent())

Prints: <QgsRectangle: 663590.58169999998062849 1541419.83070000074803829,
724630.05890000029467046 1595869.48389999940991402>

As you can see doing it with PyQGIS gives you more precision than doing it with GeoPandas.

Is there any way to get the same precision with GeoPandas?


texts: Loading a sentinel-2 image for a specific date and over a specified area of interest (given as coordinates)

texts:
I want to load a sentinel 2 scene for a specific date (24 June 2018) over a specific area of interest given by these coordinates 1: [130.887,-12.669] 2: [130.887,-12.927] 3: [131.156,-12.927] 4: [131.156,-12.669].

How do I go about this?

Code I m using is

// Load sent 2 data, filter by date and bounds.
var collection = ee.ImageCollection('sent2')
.filterDate('2018-04-25', '2018-06-5')
.filterBounds(ee.Geometry.Point((130.887, -12.669), (130.887, -12.927), (131.156, -12.927), (131.156, -12.669))


texts: How to delete a broken index in SpatiaLite?

texts:
I managed to screw up an index in my SpatiaLite database. The index was created using spatialite-gui. In the meantime, I deleted the original table and three out of four index files: idx_tablename_Geometry is still left while idx_tablename_Geometry_node, idx_tablename_Geometry_parent and idx_tablename_Geometry_rowid have been deleted too.

Whenever I start the GUI or refresh the list of tables, I'll get the error message: No such table main.idx_tablename_Geometry_node. Trying to drop the table idx_tablename_Geometry using either SQL or the GUI results in the same error message and nothing is deleted.

The database is still usable in my GIS, but it's annoying to have this error pop up every minute when working with spatialite-gui. Any ideas how to fix it?


texts: Classification, change detection and NDVI using landsat 2 (MSS), landsat 5 (TM) and Landsat 7 (ETM)

texts:
I have 3 Landsat images for the same area. One in 1972 (landsat 2 mss), one in 1996 (landsat 5 TM) and one in 2010 (landsat 7 ETM). I would like to detect changes in land cover and create diachronic maps. Also, I would like to calculate NDVIs and compare the results between the three dates. Landsat 5 and 7 are easily comparable because they have common bands. However I don't know what to do to make the Landsat 2 comparable...Normalized them?
Also I have another question. Do you usually run first a Maximum Likelihood Classifier and then calculate the NDVIs on the MLC resulting image? Or it should be a separate process?
I use ArcGIS 10.2


texts:
Many a time and oft I've spent hours struggling with bizarre bugs resulting from invalid geometries. The symptoms vary greatly, including:

Database slowdowns
Incorrect\Null query results
Log files overloaded with errors and warnings
Inconsistent result with geometric operators (e.g. intersection)

I would like to categorize the types of invalid geometries, in order to help everybody here sanitize their data.

Please answer with your favorite type of invalid geometry (one type per answer).  Screenshots, descriptions and solutions are welcome - but try to keep your answer short.


texts: Performing time series supervised classification on Google Earth Engine?

texts:
I am quite new as I only use google earth engine for a couple weeks. So if I missed anything feel free to advise
The goal want to achieved is to perform time series classification on Google Earth Engine (GEE). So far, I have only seen per image classification in the documents. I also found that you can fit a regression with image collection from Time Series Analysis in Earth Engine By Google Earth. But I can't find a way to combine these two together (I know regression and classification is two different things, but maybe I can extract model from time series analysis and use them with classification?)
If using image based classification alone, it lose the phonological pattern which can indicate plants signature overtime.
Is there a way to perform time series supervised classification on GEE?
Update 1 30/08/19
I have found a way around this by extracting time-series features by first extract interval mean in different range as different bands (From Foyou Tian, et al. ). And then use the aggregated image to classify. However this method did not fully utilize full-extent of timeseries information, and I am looking toward an alternative solution soon
For more complex model, I might use tensorflow based on slide that I have found by Chris Brown from EEIA 2019 here
If I found anything else useful I will keep update, And if anyone have a suggestion, I would gladly accepted
Update 24/12/20
I have recently got back to GEE and I decided to make linear interpolation by answering Smoothing/interpolating across images in an ImageCollection to remove missing data. So with a little bit of modification, I made a simple (pixel-wise) time-series classification of CDL using smile random forest model by flatten all interpolated time-series values into bands of single image. This method, however ignore the time invariant aspect of time-series classification, a better method would be sliding window method.
FYI

Just for baseline benchmark, I’ve got about 70% in class accuracy and 75% in area accuracy (validation) within the same year and region over 34 classes (I think this is not too bad)
I have tested a correlation between time-series interpolated using savitzky-golay vs linear interpolation in python. The result show high correlation (about 0.89), so I think for most application linear interpolation is sufficient

CDL

Classifed output

The code is available here


texts: Habitat connectivity -- how to map connectivity between polygons based on a separate polygon layer

texts:
I have a polygon layer representing a habitat type and another polygon layer representing water features.  I want to be able to assign to each water feature whether it shares a connection via a habitat polygon with another water feature or not (within a distance radius).  A complication is that if I use buffers to represent the distance radius, they overlap.  An additional complication is that I've tens of thousands of the water features.

I've experimented with different solutions using intersections, but I've not been able to come to a solution.  Anybody have any idea?  I think that this is kind of a FRAGSTATS or Patch Analyst problem, but with vector and with many tens of thousands of landscapes to run it on.

In the image below, orange polygons are water features and the green area is the habitat (the black circles are 1 km buffers).

In the map above, water features 20957 and 20882 are obviously not connected via the habitat to any other feature, nor is feature 44444 (which is connected to the habitat but not connected by the habitat to any other feature). On the other hand, there are definitely connections for 21077, 21044, 20993 and 37716, while there is no connection within 1 km for feature 21655. I don't need to know the IDs of the connecting features, or even a count, just whether or not there does exist a connection to another feature within a 1 km buffer.


texts: Updating location of waypoint using QGIS/PostGIS?

texts:
I have two situations where I some times need to update the coordinates of a way point.  Firstly where the thing it is marking has been moved and secondly when I get a more accurate fix on the location.  (Some times the first the first report we get has a fix taken under heavy canopy, in a gully with a phone and these points can be many meters off)

Usually I end up with a layer with the new location in it and I want to update the entry in the master layer.

Since I am a programmer I can do this at the database (postgis) level but I am also looking for a simple method that will work for other, less technical, folk who maintain the data using QGIS.

The situation is complicated by the fact that the master waypoint table (which I want to update) is linked to other tables by foreign keys which means I can not simply delete the old entry in the table and replace it with the new data.  I.e. I really need to update the the location in place.


texts: Set-overlay collection of polygons on itself

texts: I have a GeodataFrame in Geopandas, that consists of a number of polygons, each overlapping its neighbors. What I want is to generate every single possible polygon from all the intersections, so that the resulting polygons won't overlap each other, and on unary_union will return the equivalent to the unary_union of the original dataset. How would you achieve that?


texts: Running multiple commands in Python window for ArcGIS Pro

texts:
I am beginner at Python scripting and just started using it with ArcGIS Pro by executing commands in the Python window. However, I can only get one command to run at a time.

For example, if I enter the following lines of code in the Input Area of the python window and press "ENTER", the cursor moves to a new line in the input window instead of executing the commands.

arcpy.management.AddField("JanInt_200k_geo", "Uwt", "DOUBLE", 6, 10, None, None, "NULLABLE", "NON_REQUIRED", None)
arcpy.management.AddField("JanInt_200k_geo", "Vwt", "DOUBLE", 6, 10, None, None, "NULLABLE", "NON_REQUIRED", None)
arcpy.management.AddField("JanInt_200k_geo", "SO4", "DOUBLE", 15, 20, None, None, "NULLABLE", "NON_REQUIRED", None)

Is there a way to run multiple commands (i.e. a larger selection of my script) using this window?


texts:
I uninstalled QGIS by deleting OSGEO4W folder. Then when I try to install it again using osgeo4w setup, I get this "zip.dll was not found" error message.
Does anyone have the same issue?


texts: Setting zIndex of CartoDB.js layer on top of Google Map's GroundOverlay?

texts:
I am trying to combine the Google Maps API Ground Overlay example with CartoDB.js example using Google Maps. It appears both APIs are displaying their layers correctly.

However, the ground overlay is always displayed on top. I would like to see the positions from the CartoDB viz layer to appear on top of the ground overlay. Any suggestions?


texts: How to speed up space partitioning in postgis?

texts:
I've a bunch of overlapping polygons and I'm trying to partition the space to avoid having overlapping ones. I think my problem is fairly simple.
Using some ESRI product and http://arcscripts.esri.com/details.asp?dbid=16700 my co-worker computed it in 48s.

I'm trying to do it with postgis using http://s3.opengeo.org/postgis-power.pdf#page=24 (guessing the details, using http://trac.osgeo.org/postgis/wiki/UsersWikiSimplifyPreserveTopology as inspiration) but it's so slow that I can't do it with more than 10 polys (I've got 800 of them to split). The slow part is the ST_Union, I tried various things, but none where successful, here is the current state of affairs :

select geom from
(select st_linemerge(st_union(geom)) as geom from
    (select st_exteriorring((st_dumprings((st_dump(t.geom)).geom)).geom) as geom from
        (SELECT geometry AS geom, id
               FROM tt
              WHERE campaign_id = 204
              ORDER BY id limit 200) t) t2) t3

this has been computing for 26 min (the linemerge() is actually not ). The polys are MultiPolygons in case the st_dump bugs you.

Do you have any tip ? The st_union() of the linework is the very slow part.

Thanks,

Nico.

PS:
here are some numbers : 852 multipolygons, leading to 14880 polygons, leading to 21467 linestrings totaling 315513 vertices.


texts: How to bring over only 2 fields from the join feature class when using "SpatialJoin_analysis" and set up a merge rule?

texts:
I'm trying to understand how to use FieldMap and FieldMappings.
I know very little about objects plus I'm finding the explanations on ESRI website not very good and far from comprehensive.
All I'm trying to do is to perform a spatial join between two polygon datasets and I need to bring over to the target feature class 2 fields from the join class and the merge rule should be 'First'.

Can anyone please explain how to do this?

All I have is this incomplete piece of code:

fm = arcpy.FieldMap()
fm.mergeRule = 'First'
arcpy.SpatialJoin_analysis('fl_London_Bldngs', 'fl_VS2_agl_polyg_1', fc_VS2_agl_polyg, join_operation = 'JOIN_ONE_TO_ONE', match_option = 'INTERSECT', join_type = 'KEEP_COMMON', field_mapping = .....)

NOTE: Several polygons from the join feature class can intersect with 1 target feature. Therefore the need to establish a rule to choose the first value of those intersecting features.

Could anyone recommend a site where all this is nicely explained?


texts:
I have a leaflet map that zooms and fits on the bounds of the polygon that is clicked via onEachFeature.
Is there a way to add  another geojson layer by clicking on the polygon? I need to zoom in and add another layer on click

    var polska;

    function resetHighlight(e) {
        polska.resetStyle(e.target);
        info.update();
    }

    function zoomToFeature(e) {
        map.fitBounds(e.target.getBounds());
    }

    function onEachFeature(feature, layer) {
        layer.on({
            mouseover: highlightFeature,
            mouseout: resetHighlight,
            click: zoomToFeature
        });
    }

    polska = L.geoJson(exp_polska, {
        style: style,
        onEachFeature: onEachFeature
    }).addTo(map);


texts: Problems in making CLM files with DIVA-GIS

texts:
I am fairly new to GIS softwares and this will be my first post here. I'm working with DIVA-GIS and was redirected here. I hope this is the correct place.

I am doing a research which involves ecological niche modeling for present and future climate scenarios. However, i am having some urgent problems with creating the .clm files for the predicted future climate.

I have downloaded the necessary data from WorldClim. I have followed the instructions from "Ramirez & Bueno, 2009, Working with climate data and niche modeling: Creation of bioclimatic variables", but DIVA GIS doesn't seem to want to create the files.

Basically, i open up the "Make CLM files" window in DIVA GIS, and have all the necessary 36 .grd files + the alt.grd required for the operation. I have correctly inserted the prefixes and ticked their boxes. As soon as I press "OK", these boxes automatically uncheck, the 36 files are not split into the "selected files" spaces present in the window, and the program only creates the single climate.cli files.

I have found this question being asked on the Internet but with no answer.

I have no idea how to solve the issue as everything seems to have been done correctly. Does anybody have an idea?


texts: Repeated labeling of random points within polygon?

texts:
I have created 3 random points within each of 27k polygons. I now want to label each of those 3 points as "A", "B", "C" within each polygon.

Is there a quick/automated way to do this?


texts: How to change icons for Leaflet markers when using cluster plugin?

texts:
I'm using Leaflet MarkerCluster. I created a MarkerClusterGroup as markers1 as you can see. There's about a hundred points I have written like var addressPoints in this format:

   var addressPoints = [
    [40.747344,-73.994985, "***", "***", "University", "***", "***", "***"],

This is my code:

var markers1 = new L.MarkerClusterGroup( { showCoverageOnHover: false } );

        ......
    for (var i = 0; i < addressPoints.length; i++) {
        var a = addressPoints[i];
        var title = a[2];
        var direct = a[3];
        var univ = a[4];
        var city = a[5];
        var state = a[6];
        var country = a[7];
var marker = new L.Marker(new L.LatLng(a[0], a[1]), { icon: myIcon } );

        ......

marker.bindPopup(list);

I need to put three different icons for markers for each "University" category (3 categories). That is var univ = a[4] in this list. I don't want to change those nice green circles when markers are clustered, but those icons for standalone markers when we're using big zoom. Is there some way to do that?


texts: Understanding red X over Python Toolbox icon

texts:
I've been updating a toolbox script, and I keep getting barred from accessing the script through ArcCatalog:

I make my updates on pythonWin, then check its validity in ArcMap. I've tried restarting Arc, pythonwin, and my computer, but to no avail. I have ArcGIS 10.4.1 for Desktop with an Advanced license.


texts: Converting MultiLinestring to Linestring with PostGIS


texts: Debugging Select By Attribute tool within loop giving ERROR 000358: Invalid expression Cannot acquire a lock?

texts:
I have seen several similar posts related to this technique but I am still having issues. The following script is intended to select all points from one shapefile that are within the boundaries of a second polygon shapefile, then edit the number of points selected into one of the polygon fields. I have not been able to get the where clause statement to function properly although from the error message it appears to be correct. Both shapefiles are within a file geodatabase and feature layers where created for both in order to use the selection functions.

Here is the code:

arcpy.MakeFeatureLayer_management("treatment_maps",'maps')
arcpy.MakeFeatureLayer_management("points_2014",'points')
cursor=arcpy.UpdateCursor("treatment_maps")

for row in cursor:
    map=row.getValue('map_name')
    where='"map_name"' + '=' + '\'' + str(map) + '\''
    arcpy.SelectLayerByAttribute_management("maps","NEW_SELECTION",where)
    arcpy.SelectLayerByLocation_management("points","COMPLETELY_WITHIN","maps")
    count=arcpy.GetCount_management("points")
    row.setValue('DI_Count', count)
    cursor.updateRow(row)

Here is the error statement:

Executing: SelectLayerByAttribute maps NEW_SELECTION "map_name"='Airport'
Start Time: Wed Jan 15 13:00:56 2014
ERROR 000358: Invalid expression
Cannot acquire a lock.
Cannot acquire a lock.
Failed to execute (SelectLayerByAttribute).
Failed at Wed Jan 15 13:00:56 2014 (Elapsed Time: 0.00 seconds)

The treatment_maps features class contains polygons and counts (DI_Count) for points located within each polygon, which need to be updated. I'm hoping to get this script to work properly as I have around 100 polygons to update.


texts: Geodjango - using projected coordinates with olwidget

texts:
I have a database in GeoDjango containing data based on the Australian MGA54 coordinate system (SRID 28354). I have the srid set in the model definintions and when using the standard GeoModelAdmin (using OSM as base layer) it all works fine, displaying the onjects in the correct location and allowing them to be editted correctly.

For a more functionality I would like to use Olwidget in the Django admin, with the Google layers as basemap, however it doesn't seem to handle the MGA54 system. I have set the 'projection' to 900913 and 'display_projection' to 28354, however this is not working correctly. If I set the text area to visible I can see that it is setting the SRID correctly at the start of the WKT statement, but then is using coordinates that I suspect are in 900913.

I read somewhere that Openlayers can only transform 4326 and 900913 without using Proj4s libraries, but starnge that Djangos GeoModelAdmin can handle it correctly.

Does anyone know if it is possible to use alternative coordinate systems (beyond 4326 and 900913) with olwidget and if yes how to go about it?


texts: Select feature based on both its own attributes and another feature's attributes

texts:
I have two points within a polygon, each representing a specific event with a date (listed as 120101 and 120719). The polygon itself represent an event for an extended time period (start: 120626 and end: 130114). I'm working in ArcMap 10.2.

What I want to do is to be able to select the point that falls with the polygon's time period by use of query. How do I do that?

Here's a picture showing the setup:


texts: Accessing QGIS program settings programmatically?

texts: I am trying to temporarily enable the option in QGIS using PyQt4 to suppress the attribute dialog popup after a feature is added. I found an example in the cookbook but it doesn't indicate how to get to existing settings.


texts: passing an URL to owslib in Qgis editor doesn't work properly?

texts:
I'm trying to determine the version number of several WFS using the python module owslib.
since i need to use this version number in ogr2ogr (and for some reason, python's ogr2ogr only works in Qgis' editor), i am runnign this in Qgis 3.2's python editor window.

This has been working fine for around 5-6 wfs urls (both with http and https). however when i get to the url:
https://arealinformation.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer?service=WFS

the code:

from owslib.wfs import WebFeatureService as wfsmod
url = "https://arealinformation.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer?service=WFS"
wfs = wfsmod(url)

crashes and returns:

  requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://arealinformation.miljoeportal.dk/gis/services/DAIdb/MapServer/WFSServer?service=WFS%C2%A0+&request=GetCapabilities&version=1.0.0

I have tried the code both in the python console in qgis 3.2 and in a seperate python IDE. It works there without crashing.  But as said, i need to run this in the editor because this snippet is part of a larger code, which doesn't function in the IDE and the python console window in qgis.


texts: I have the trial version of ArcGIS 10 (ArcEditor licence). The trial automatically installs and authorises all extensions for the trial period. However, in ArcMap I can only see Maplex, 3D Analyst and Spatial Analyst in my Extensions dialog box. When I check ArcGIS Administrator, it lists all the extensions as "authorised", but only the extensions I mentioned above as "installed". The others are "not installed". I am a bit confused about this, as the extensions are supposed to be automatically included as indicated here.


texts:
I'm working with a point dataset that contains, sometimes, (almost) repeated features:

data_id year    event_type  assoc_actor_1
5270361 2000    Riots   Madinka Ethnic Group
5270361 2000    Riots   Balanta Ethnic Group

As they share the same id, I'm looking for a way to select just one of those redundant features (any of them). It can be via expression builder or python.

I've seen that set(list) does the trick, but how can I integrate that in selectByExpression()?

In the expression builder, count_distinct() identifies unique id, but how could I use it to select features?

In Getting list of distinct values from shapefile field using QGIS? the user is looking to retrieve a text file with the results. I wanna do it... graphically (?).


texts:
Not sure if I'm missing something very basic or not, but I have 6 or 7 shapefile vector layers in a dozen or so models that I need to update a single field with a rather simple formula.  I could spend the time to simply edit each layer and update the field, but I was hoping to use the processing modeler to take advantage of batch processing.  My trouble is that I'm not understanding how to use the modeler to update existing layers - I've used it several times to create a new layer, but not update any existing ones.  I assume I'm just missing a piece of the puzzle?...

An example is that I have a field called "MNCPL_ID" which I want to update with: lpad(  "STREETID" ,4,0)  ||   lpad(  "SEGMNTID" ,3,0)  ||   lpad( @row_number,3,0) - easily done layer by layer with the field calculator, but how can I automate the process?
(Bonus points if you have a suggestion to make the last 3 numbers sequential for each "STREETID" instead of using @row_number)

*Not familiar with python scripts / still learning.


texts:
When I open an old project (QGIS version 2.8.9) with QGIS 2.18.10, I catch an error that says:

Project file is older : this project file was saved by an older version of QGIS. when saving this project file, QGIS will update latest version, possibly rendering it useless ...

After that QGIS crashes. How can I fix it?


texts: How to style points in QGIS based on multiple attributes

texts:
While trying to find a useful way having earthquakes displayed, I noticed that it isn't that easy to manage.

I'd like to be able to recognize the "Magnitude", "Date", and "Depth" from the style of the point. Something like:

size: based on magnitude
depth: basic color (ex. <15 red, 15-30 yellow, >30 blue)
date: intensity of color as shading from 100% color to white/...

Is there a way to do so without defining dozens of rules?


texts:
I am trying to set a logarithmic colorbar for an image in IDL. For the command cgColorbar it is trivial (/YLOG: Set this keyword to use logarithmic scaling for the colorbar data range.) I am running IDL from terminal window, so the command cgCOLORBAR is not recognized.  For the simple command Colorbar, YLOG in the example below is undefined:
image = COLORBAR(TARGET=g0,ORIENTATION=1,POSITION=[0.97,0.25,1.,0.75],/YLOG)

What is the simplest way to have a logarithmic colorbar?


texts:
I know that for QgsVectorLayer, there is the QgsSymbolV2SelectorDialog dialog that I can call to allow users to change vector layer's styles. I am looking for an equivalent dialog for QgsRasterLayer. I found a QgsRasterRendererWidget and I put it in a QDialog, but when I instantiate it like:

layer = QgsRasterLayer()
editor = QgsRasterRendererWidget(layer, layer.extent())

it gave the following exception:

TypeError: qgis._gui.QgsRasterRendererWidget represents a C++ abstract class and cannot be instantiated

So, is there a dialog class that I can use to open the raster property dialog to allow users to change raster render style?


texts: C++ coordinate class that automates projection?

texts:
Can anyone point me to a C++ class for representing coordinates that automatically handles projection transforms? What I'm thinking of is something that would allow me to create vars that incorporate a projection and have appropriate geographic operators such that comparisons make sense even when the coordinates are in different projections.
Using template notation (though I can't figure out how to template on a projection)

  Coord < SRID:1234> point1 (x1, y1);   Coord < SRID:5678> point2
  (x2, y2);

if (point1.east(point2)) ... // true if point1 is east of point2

or

point2 = point1 // This operation assigns the coordinates of point1 to point2,
using the coordinate system of point2 (in this case SRID::5678).


texts: Does arcpy.SearchCursor function support field indexing?

texts:
Does the arcpy.SearchCursor function support field indexing? In the sample script below, can I sent my cursor to loop through the values in the first field by setting an index to search the first field?

for x in arcpy.SearchCursor(filepath):
    print x[0]


texts: Hosting webmap on Google CLoud Storage without compromising data

texts: Does anyone know how to host a webmap (made with QGIS and Leaflet) on Google Cloud Storage publicaly, so that the HTML showing the webmap is accessible but the data driving the map is not. Bucket permsisions can be set for each object in the bucket however, the webmap does not load when access to the JSON data driving the map is not public also.


texts: value field name after raster to polygon conversion

texts: When I perform Raster to polygon conversion using tool, sometimes it creates a field named "GRIDCODE", sometimes the field name is "grid_code". Why does it create random name of a field?


texts: Concatenating variable values in Python script for export DDP as mxd via saveACopy method?

texts:
i am building a script, most of which i found on here, that exports my data driven pages as mxds.  I need it to save the mxd by a specific attribute in the shapefile and am running into an error when trying with two attributes.  It works with 1 attribute but i can't combine them.

import arcpy
a = 'L_NAME'

b = 'PAR_NUM'

c = a + b

mxd = arcpy.mapping.MapDocument(r"C:\Users\jcarl\Desktop\Presentation\P_Litwin.mxd")
ddp = mxd.dataDrivenPages
for pageNum in range(1, ddp.pageCount + 1):
   ddp.currentPageID = pageNum
   print "Saving %s.mxd" %(ddp.pageRow.getValue(c))
   mxd.saveACopy(r"C:\Users\jcarl\Desktop\Presentation\MXD\\" + ddp.pageRow.getValue(c) + ".mxd")
  del mxd

like i said it works if i just use a, or b, but not together.  I am trying to export as attribute (attribute).


texts:
I have a shapefile with several contiguous polygons and I want to reduce their number of nodes.
I was thinking of deleting nodes based on the angle that results from the 2 segments on either side of the node; in particular deleting nodes which form angles of <180 and  >170º.
How could I do this in ArcMap?


texts: Could not locate a layer  with id  GWC configuration seems to be out of synch

texts:
Geoserver fails to start with exceptions:

29 Geg 10:50:51 WARN [org.geoserver] - Failed to load layer group 'NP2014.xml'
java.lang.IllegalArgumentException: Layer group within a workspace (W1) can not contain resources from other workspace: W2

and

Could not locate a layer or layer group with id LayerGroupInfoImpl--76c8fe6e:156cfaae875:-1156 within GeoServer configuration, the GWC configuration seems to be out of synch

Did not find the accordind layer .xml file in gwc-layers.

Link to the catalina.out https://ufile.io/aq41f


texts:
I would like to write a sequence of numbers of lines that goes from 1 to 90 and restart on 1 again.

For example

1
2
3
1
2
3
1
2
3


texts: Where does Google get updated data about postal codes?

texts: I have been searching for the most recent list of Postal Codes in US but I most of them are two or three years old. I did cross check them with the Google Maps, though most of them them were correct but I can say 5% of them were not. Then it made me thinking from where does Google update it's data about Postal Codes? Any leads?


texts: Export tracklog from GPS information panel

texts:
When I use QGIS on the field, I always turn the tracklog on in the "GPS information" panel. So the tracklog is showed as I walk with the GPS on, but I can't find the way to download this track into a shapefile or a GPX file.

Can someone explain me how to proceed?


texts: Merge multiple geometry type TAB files in QGIS/OGR

texts:
I have a number of vector layers with all types of geometry (point, line/multiline, poly) and I want to combine them into a single layer in QGIS.  I know MapInfo can do it but with the other 99% of my workflow in QGIS it's the last step to having a complete pipeline.

It seems there are a number of tools to merge shapefiles together (assuming equivalent geometry types) in QGIS but this doesn't help me.  There's ogr2ogr but running the following statement gives me a failure:

ogr2ogr -f "MapInfo File" merge.tab points.tab
ogr2ogr -update -append merge.tab lines.tab -f "MapInfo File"
FAILURE:
Unable to open existing output datasource 'merge.tab'

It'd be fine if I wanted to merge a bunch of layers with the same geometry (use SHP, merge, save result as TAB), but multiple geometry types are eluding me.

I could write a little program using Tatuk Developer Kernel but I'm not that happy with its handling of projections (using EPSG:28355 it seems to create a projection that is 'custom' when viewed in QGIS or MapInfo).


texts: understanding the use of the "_.[method call?] syntax in Leaflet

texts:
I have been using Leaflet as of late and enjoy the "lightness" of this API vs. OpenLayers. One of the things I am doing is looking at examples and/or source code from pages that use this API. I recently came across some code that I am at a complete loss as to the method it is using to call a method. There are several places where calls are made using _.[method name], but I have no idea what the underscore is referring to. Ex. _.sortBy(flights, function (value). Is this just creating a new function?? I'm used to the $ used for jQuery, but this underscore is new to me and I cannot find anything on the web about this. Can anyone help?  Or am I barking up the wrong tree and this code has nothing to do with leaflet??

A code block is included for reference.

map = L.map('map').setView([44.715514, -112.148438], 4);

// Add the Stamen toner tiles as a base layer
var baseLayer = new L.StamenTileLayer('toner', {
    detectRetina: true
}).addTo(map);

// Add a layer control
var layerControl = L.control.layers().addTo(map);

// Add a legend control
var legendControl = L.control.legend({
    autoAdd: false
}).addTo(map);

// Create a lookup of airports by code.  NOTE:  this is easy, but non-optimal, particularly with a large dataset
// Ideally, the lookup would have already been created on the server or created and imported directly
var airportsLookup = L.GeometryUtils.arrayToMap(airports, 'code');

// Sort flight data in descending order by the number of flights.  This will ensure that thicker lines get displayed
// below thinner lines
flights = _.sortBy(flights, function (value) {
    return -1 * value.cnt;
});

// Group flight data by airline code
var airlineLookup = _.groupBy(flights, function (value) {
    return value.airline;
});

var maxCountAll = Number(flights[0].cnt);

// Get the top count of flights
flights = _.filter(flights, function (value) {
    return value.airline !== 'all';
});


texts: Using definition queries in GeoMedia Professional?

texts: Does anyone know if GeoMedia 6.1 Professional has a selection feature that is equivalent to ESRI's ArcMap Definition Query function or anything similar to it?


texts: Temporary File GDB-based scratch workspace is not deleted after it is released

texts:
I have created a temporary File GDB-based scratch workspace as follows:

var factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBScratchWorkspaceFactory");
var factory = (IScratchWorkspaceFactory)Activator.CreateInstance(factoryType);
var workspace = factory.CreateNewScratchWorkspace();

Running this code creates a File GDB in my user profile's .\AppData\Local\Temp directory.

Esri's documentation claims that:

  "Workspaces created by IScratchWorkspaceFactory.CreateNewScratchWorkspace will be automatically deleted when the last reference to them is released."

However, this does not happen. Even after my application terminates, and even though all ArcGIS application have been closed, the File GDB remains in my temporary folder.

I have tried explicitly releasing the workspace:

Marshal.FinalReleaseComObject(workspace);

But that does not delete the temporary File GDB either. Trying to additionally delete the directory will not work either, because some file in the File GDB directory is still in use:

var path = workspace.PathName;
Marshal.FinalReleaseComObject(workspace);
System.IO.Directory.Delete(path, recursive: true);

Am I doing something wrong? And if so, what? How do I best deal with scratch workspaces that are no longer in use?
Is the documentation simply incorrect on this point?
Or will Windows regularly delete that temporary folder and thus delete the scratch File GDB? (This does not seem to be the case.)


texts: More than one iteration least cost paths from everywhere to everywhere in ArcGIS Desktop?

texts:
I am working on a project with a colleague and we are looking for a way to automate the whole process of generating least cost paths from everywhere to everywhere in ArcGIS' ModelBuilder.

We have a grid of 637 points regularly distributed every 10 km across the landscape. We have a separate shapefile for each point in a geodatabase. We can easily generate the cost distance and backlink files for each of the source points by iterating with "Iterate Feature Classes". However, when it comes to creating the cost paths, there does not seem to be an easy way of automating the process, as it is not possible to use a second iterator in ModelBuilder.
We are doing a couple of destination points each time (see an example in the figure), but this takes a long time.

Is there any way to automate this process?

We reinforce that, for methodological reasons, we need to generate each path separately from each source to each destination, instead of creating paths from a source to all other points.


texts: QGIS QImage, can't specify a specific path

texts:
I'm a newbie in QGIS and I have to write a small python script to automate shapefile loading, applying style and save image. I'm having trouble on this last item.

Here is the thing:

img.save("render.png","png")
True
img.save("C:\FOLDER\USER\render.jpg","JPG")
False

Where img is a QImage instance. And I can't find the image produced with the relative path.

For a better understanding, here is all the code part concerning image output, which is from QGIS workbook :

img = PyQt4.QtGui.QImage(PyQt4.QtCore.QSize(800, 600), QImage.Format_ARGB32_Premultiplied)

color = QColor(255, 25, 255) img.fill(color.rgb())

p = QPainter()
p.begin(img)
p.setRenderHint(QPainter.Antialiasing)

render = QgsMapRenderer()
layer = iface.activeLayer()
lst = [layer.id()]
render.setLayerSet(lst)

rect = QgsRectangle(render.fullExtent())
rect.scale(1.1) render.setExtent(rect)

render.setOutputSize(img.size(), img.logicalDpiX())

render.render(p)

p.end()

img.save("render.png","png")


texts: QGIS rule based symbology for rasters in Atlas?

texts:
I'm making species distribution maps and have got the Atlas working perfectly using a polygon layer to show the quarter degree grid cells for species observation records. I have ~ 250 species. Problem is that I have for most species a predicted ecological niche model (raster) which I would also like to display on the map and I can't find a way to do this using the Atlas functionality. Theres a very helpful post showing how to use rule based symbology for another polygon file but not for rasters (How to filter features in other layers of a QGIS Atlas?)

Does anyone know how to slove this problem?


texts:
I am trying to calculate volume using the GRASSplugin. I have my area information in vector format and my depth information in raster. I read that it is important to set the raster resolution before using GRASS. How do I know what resolution to use? My extent is currently the entire world for this project but it doesn't need to be.

Here is a tiff of the area I am working with: It is currently in WGS84 but I will save it as a custom CRS using lambert, centered at 70degrees:


texts: Performing PostGIS spatial joins with remote host?

texts:
I have approximately 600,000 points that must be joined to ~12 million polygons. This process happens weekly, with the potential to happen daily. The polygon data never changes, and is stored in a remote PostGIS database. The points are currently pushed from R to the remote PostGIS server and ST_DWithin is performed to join polygon attributes to the points. Is there way to keep my points local (i.e. within my R environment) and query the remote polygons?

The goal is to not let highly confidential information (the points) needlessly be copied to a remote server as a temporary table, if I can help it.


texts: wrong coordinates for wfs MultiLineString from geoserver

texts:
I have a leaflet application and I want to display some WFS layers coming from Geoserver.

In Geoserver, I declare my layer with a "native SRC" EPSG:2154, and with a "declared SRC" EPSG:4326 and set "SRS handling" to "Reproject native to declared" to display it in leaflet.

Now, if I try to display the wfs with leaflet, it renders something weird. I have the first point of the line at the right coordinates, but then, lines are going to wrong coordinates, thousands kilometers away from they should be.

Here is a part of the jsonp  :

parseResponse({"type":"FeatureCollection","totalFeatures":1079,"features":[{"type":"Feature","id":"conduites_eu_l93.1","geometry":{"type":"MultiLineString","coordinates":[[[1.5613439688423163,49.03869313600971,0],[-1.5777641664737554,-2.180153996047118,6883035.044373245]]]},"geometry_name":"geom","properties":{"code_insee":78057,"diametre":200,"type":"IND","longueur_m":67.88,"bbox":[-1.5777641664737554,-2.180153996047118,1.5613439688423163,49.03869313600971]}},{"type":"Feature","id":"conduites_eu_l93.2","geometry":{"type":"MultiLineString","coordinates":[[[1.5614998405017906,49.039338391376226,0],[-1.5777936149688272,-2.1796435609058618,6883111.061549901]]]}

As you can see, the first coordinates are rights, but the second point is wrong.

Is there a problem reprojecting with geoserver ?
I tried not to reproject, but I still have the same problem with other wrong coordinates.


texts: Removing no data pixels from raster using ArcMap

texts:
How can I remove no data pixels completely from an Image such that it won't be considered in any geoprocessing tasks?
For example, raster to polygon still creates polygons for no data pixels and I don't want that.
I am using ArcMap with a Basic level license


texts:
I need some help with a raster file in ArcMap. The raster is a validation file for a classification that should follow after. Therefore, I need to "cut" the upper and lower 5% of the data in the raster. My histogram looks like this:

I want to solve this in ArcMap because it failed at loading it into RStudio as the program cannot allocate the vector because of its size. My aim is to have a new value range that I can use for a classification.

Does someone know a way to do this?


texts: Geonode or Geoserver generates a random sld file for geojson layer during upload, how do I change this

texts:
When I upload a new geojson layer through geonode web interface a random sld file is generated and it becomes the default style for the new layer.

I would like to remove this random behavior and have geonode or geoserver assign a default/predefined sld to all uploads.

Can anyone point me in the right direction?

CLARIFICATION:

The behavior is not completely random. This one below has a "teal" fill but each upload is assigned a different color. The line stroke is always black and the same width.


texts:
The application I created allows me to import a polygon shapefile into my Leaflet map. However, I would like to set up a point shapefile import on the same button. I tried several attempts, especially with "addCircles". One or the other works, but not both at the same time. How could I go about it? Here is my code:

ui.R

shinyUI(
      dashboardPage(

    #bandeau principal
    dashboardHeader(title ="Sen2extract"),

    #menu a gauche
    sidebar <- dashboardSidebar(
      sidebarMenu(
          #Les differents widgets du menu
        menuItem("Carte", tabName= "carte", icon = icon("globe")),
          fileInput(inputId = "shp", label = "Importer un shape :", multiple = TRUE, accept = c('.shp', '.dbf','.sbn', '.sbx', '.shx', '.prj')),
          actionButton(inputId ="reset", label = "", icon = icon("trash-alt")),
          selectInput(inputId ="dataset", label ="Choisir un indice :", choices = c("NDVI", "NDWI GAO", "NDWI MCF", "MNDWI")),
          br(),
          dateRangeInput(inputId ="dates", label = "Selectionner les dates :", start = "2019-01-01"),
          submitButton("Rechercher", icon("cog", lib = "glyphicon")),
          downloadButton("downloadData", label = "Exporter en CSV"),
          br(),br(),
        menuItem("A propos", tabName = "about", icon = icon("list-alt")),
        menuItem("FAQ", tabName = "faq", icon = icon("question-sign",lib= "glyphicon"))
      )
    ),

    #contenu de l'application
    dashboardBody(
      tabItems(
        tabItem(tabName ="carte",leafletOutput(outputId = "map", width="100%",height = "1100")),
        tabItem(tabName ="about",h1("Bienvenue sur l'application sen2extract !"),
                p("Cet outils permet l'extraction de series temporelles des indices spectraux sur differents sites d'etudes.")),
        tabItem(tabName ="faq", h1("F.A.Q"), h3("Mon shape ne s'importe pas, comment faire ?"),
                p("Referez-vous aux indications de l'onglet Description"),
                h3("L'extraction de ma serie temporelle est anormalement longue, est-ce normal ?"),
                p("Il est possible que l'extraction prenne du temps. Cela va dependre du nombre de polygones en entree, ainsi que de la plage temporelle configuree"))
      )
    )
  )
)

server.R :

library(shiny)
library(shinydashboard)
library(leaflet)
library(rgdal)
library(utf8)
library(sf)
library(rgeos)
library(sp)

shinyServer(function(input, output, session){

  # create reactive upload file function to store data
  uploadShpfile <- reactive({
    if (!is.null(input$shp)) {
      shpDF <- input$shp
      pwd <- getwd()
      updir <- dirname(shpDF$datapath[1])
      setwd(updir)
      for (i in 1:nrow(shpDF)) {
        file.rename(shpDF$datapath[i], shpDF$name[i])
      }
      shpName <- shpDF$name[grep(x = shpDF$name, pattern = "*.shp")]
      shpPath <- paste(updir, shpName, sep = "/")
      setwd(pwd)
      shpFile <- readOGR(shpPath)
      shpFile <- spTransform(shpFile,CRS("+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0"))
    }
  })

  output$map <- renderLeaflet({

    leaflet() %>%
      addProviderTiles("Esri.WorldImagery", group = "Esri World Imagery", options = providerTileOptions(minZoom = 2, maxZoom = 17)) %>%
      addTiles(group = "OSM", options = providerTileOptions(minZoom = 2, maxZoom = 17)) %>%
      addMiniMap(toggleDisplay = T) %>%
      setView(lng = 97.963,lat = 20.380, zoom = 6 ) %>%
      addLayersControl(baseGroups = c("Esri World Imagery", "OSM"))
  })

  observeEvent(input$shp, {
    if (!is.null(uploadShpfile())) {
      cent <- gCentroid(spgeom = uploadShpfile(), byid = FALSE)
      leafletProxy("map") %>%
        addCircleMarkers(data = uploadShpfile())
        addPolygons(data = uploadShpfile()) %>%
        setView(lat = slot(cent, "coords")[[2]], lng = slot(cent, "coords")[[1]], zoom = 7)
    }
  })
})


texts:
has anyone used Bing Maps Birdseye Viewer tiles in other applications? I have seen Leaflet Bing but it looks like it just has aerial, aerial with labels and road tiles. Does it have birdseye tiles? Is there anything else that I could access birdseye tiles on?

Ultimately, I'd like to be able to overlay JSON files on the birdseye tiles.


texts: Creating Custom OSM Map Stylesheet (Ubuntu tileserver)

texts:
I have researched, but not found yet a way to create custom stylesheets like ex.:

OSMBright, or carto-openstreetmap stylesheets, and integrate it on my own Ubuntu Tileserver from Openstreetmap data.

At the moment I am using Carto-Openstreetmap stylesheet. Any information on how can I achieve creating a new custom designed differently?


texts: QGIS print layout: Pulling the name of the map theme from table

texts:
Currently I have a table of layout names, that are now linked to some layout template to pull the supplement nr, titel of the map and the sourc(for example AGIV, DOV, etc.)
This I have done by just adding some attribute table frames with the filter "Layout" = @layout_name. Now I want to take this one step further, in the actual table I also have the name of the viewport/theme of the map, normally this was used to keep a record of the theme of the map I should use.
So how do I build the expression that the name of the map theme gets pulled from a certain table (in this case the "QGIS Bijlagen Lijst) or rather from a certain layer without geometry?
Edit: here is the list of name and layer theme, note I have added a fifth variable called scale (schaal). Which is surprise surprise supposed to be the scale of the layout. The formula for the theme should theoretically being used for the scale as well.