Tag Info

Hot answers tagged

4

I'm having difficulty with the classification of "search by attribute" as a "language". To understand an answer to this startlingly broad question requires understanding of the meanings of a number of computer terms, including: Application software, programming language, data format, user interface, and access paradigm. ArcGIS is application software. It ...


2

I always encourage to use field delimiters to access the fields in a right way: field_name = "UNIQUEID" input_value = 5 sql_exp = """{0} = {1}""".format(arcpy.AddFieldDelimiters('c:/data/file_gdb.gdb', field_name),input_value) print sql_exp >>> 'UNIQUEID=5' Another way to do this is to use the str.format(): sql_exp = """{0} = ...


2

Just as an update to reflect the fast development in QGIS: In QGIS 2.8.2 (I don't know when it was introduced), commenting in expressions now seems to work! Using -- for one-line comments and /* ... */ for multi-line comments turnes the letters to a green color in the expression builder window and they seem indeed to be commented out! Thanks to the ...


2

I'd suggest an alternative approach: Download raw OSM data and use OGR to prepare your data in such a way that the relevant tags are not mashed together in the "other_tags" column. This can be achieved by customizing OGR's osmconf.ini file as documented in http://www.gdal.org/drv_osm.html. Look for the lines # keys to report as OGR fields ...


1

Vince is right. in the jsapi this is expressed as query.orderByFields https://developers.arcgis.com/javascript/jsapi/query-amd.html#orderbyfields in REST itself, the parameter is the same: http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/


1

I found an answer with a count & group by: select c.gid, c.*, count(c.gid) from c1 join c2 on st_disjoint(c1.geom, c2.geom) WHERE c2.nom_comm ILIKE 'blabla' GROUP BY c.gid having count(c.gid) >22 ; 22 means disjoint with all features of c2.


1

The problem here is you are converted the FID (objectID field type) value to string which should be a numeric value within the expression, try this: with arcpy.da.UpdateCursor('Sales_lyr', ["BOROUGH", "FID", "COUNT"]) as cursor: for row in cursor: expression = '"FID" = {}'.format(row[1]) ...


1

I would recommend to extract all relevant ways from Overpass API using regular expressions. Here's an example which returns only ways with a permissive value in any key in the current bbox. [bbox:{{bbox}}]; way[~"."~"^permissive$"]; (._;>;); out meta; Overpass Turbo Link: http://overpass-turbo.eu/s/9ML (Hit "Run" to test) You can use pretty much the ...



Only top voted, non community-wiki answers of a minimum length are eligible