New answers tagged

1

I found a solution without python and postgis, using the graphical modeller. Here is a summarized explanation. Step 1: extract end nodes with v.to.point give them a unique id give them a new attribute roadtype based on following expression case when highway IN ('path','footway','footpath','steps','cycleway','pedestrian','track','bridleway') ...


3

Create a view CREATE VIEW v_location AS SELECT id, name, address, ST_AsGeoJSON (location) AS location FROM "locations"; Use the "SELECT *" on it: SELECT * FROM v_location where "locations"."id" = 2 limit 1


2

To prepare your script for receiving a parameter from the user, assign value to arcpy.getParameterAsText(0). The zero in the assignment identifies this as the first parameter you will set in the script tool. Next, modify your script to work with the parameter. Add an IF/ELSE statement to handle the option to clear the query: value = arcpy....


2

The following query translates your question into a PostGIS query which sets the default state speed to all roads with NULL speed completely within a state. UPDATE roads SET speed = states.speed FROM states WHERE ST_Within(roads.geom, states.geom) AND roads.speed IS NULL


0

A few things b-tree and GiST are different. And since there isn't a GiST index for bytea, then you were probably attempting to build a b-tree on a bytea which will not work. PostGIS has two spatial types: geometry and geography. They can be cast to and from bytea. Perhaps you have a table that looks like this: CREATE TABLE my_table ( id integer ...


2

You don't need to store your query extent in the database, but the best option is still to make a geometry type from it. I would recommend making a WKT represenation of your geometry by whatever means you deem appropriate, then just use ST_GeomFromText in a query, e.g.: -- wkt is a WKT representation of your box SELECT * FROM bc_roads WHERE bc_roads.geom &...


0

It's clunky but you can query on the extent of the map and then loop through the results to get the attributes you want. For example: require(['esri/tasks/query', 'esri/layers/FeatureLayer'], function (Query, FeatureLayer) { var query = new Query(); query.geometry = projectsOverlayMap.extent; featureLayer.selectFeatures(query, FeatureLayer....



Top 50 recent answers are included