Tag Info

Hot answers tagged

6

Use field calculator (Python) on shape field, e.g.: arcpy.Point(1747952,5907660) If you know coordinates of this point. This is extension of original answer. Create a copy of the layer in table of content and and call it 'points'. Select correct point in 'points. Use field calculator (Python) on shape field for record with missing geometry: def ...


2

Assuming you have at least PostgreSQL version 9.3, you can use a few JSON functions and operators to extract the relevant parts of the GeoJSON specification required by ST_GeomFromGeoJSON to create geometries. Try the following, where you can replace the JSON in the top part: WITH data AS (SELECT '{ "type": "FeatureCollection", "features": [ { ...


2

They are inverted (width, height). Try this: . . . for row in range(height): for col in range(width): . . . Editing Note: I edited your code: from osgeo import gdal from PyQt4.QtCore import * from qgis.analysis import QgsRasterCalculator, QgsRasterCalculatorEntry from qgis.core import QgsVectorLayer, QgsField, QgsMapLayerRegistry, QgsFeature, ...


2

When you have a record but no geometry it's known as a null geometry. The quick fix while in an Edit Session is to select the record/row in question and use the Replace Geometry tool on the Advanced Editing toolbar. This will allow you to create a point to replace the null. It works on points, lines, and polygons, and can replace both null and exisiting ...


2

Here's a solution works with lines and polygons but not points (for that see @ChrisW's answer): the Continue Feature tool from Edit Vertices toolbar. (Doesn't help Amy, but maybe someone else later). start editing, open the feature class attribute table select a has-attribute-only record pan/zoom to correct location r-click on map, select Edit Vertices, ...


2

In short: use ST_Dump, which will break your MULTIPOINT into its constituent parts. Then sort descending by ST_Y(geom) and get the first row. Here's a query that works on my PostGIS: SELECT ST_AsText(geom) FROM ST_Dump(ST_GeomFromText('MULTIPOINT(2 5, 3 1, 4 0)')) ORDER BY ST_Y(geom) DESC LIMIT 1


1

Usually you would ask the features to give you their schema using: SimpleFeatureType schema = collection.getSchema(); You can then use that to generate the Oracle schema to write the data into.


1

I've not tried this personally in this exact situation, but you should theoretically at least be able to add a new point at the correct location (leaving the attributes blank). Then go to the attribute table and select both rows (the newly created point without attributes and the corresponding attribute record without a point). Then go to the Editor ...


1

Solution: Make sure that the SRID's in the geometries match. The SQL MSDN Documentation states: STContains always returns null if the spatial reference IDs (SRIDs) of the SqlGeometry instances do not match. And sure enough, I get null. When I defined the polys I gave them an SRID of 0, so they matched and the query worked as expected. In my second ...



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