Tag Info

Hot answers tagged

7

You can accomplish this in batch mode, in ModelBuilder and with Python. Batch Mode: First delete your old XY fields using Delete Fields in batch mode. Right click on the tool and select "batch". Drag the files you want to process into the dialog box. The rows will automatically update to include all of the files you are processing. Choose the XY ...


3

If you are running PostGIS 2.0+, you can use the ST_RemoveRepeatedPoints function, so no need to go thru all that trouble of extracting and reconstituting http://postgis.net/docs/manual-2.1/ST_RemoveRepeatedPoints.html UPDATE yourpolygontable SET geom = ST_RemoveRepeatedPoints(geom);


3

As mentioned above, you can use: arcpy.SimplifyPolygon_cartography("polygon", "output", "POINT_REMOVE", 1) You might have to tweak the tolerance- I'm not real familiar with how it works. You could also do this using geometry, but there are a lot of factors that go along with it. It's hard to tell by your question if this is for many features, or just one ...


2

It is up to the WMS server admin which formats the server is configured to support for GetFeatureInfo. Check from the GetCapabilities of the WMS server the list of supported INFO_FORMATs. Geoservers by default support geojson and GML info formats and those include also geometries with GetFeatureInfo results. You can try with the following links: ...


2

You probably should just create a new column and I would suggest if you are new to PostGIS, you probably want to use geography instead of geometry. So somethng like ALTER TABLE m_copy ADD COLUMN geog geography(POINT,4326); UPDATE m_copy SET geog = ST_SetSRID(ST_Point(longitude,latitude),4326)::geography; If you decide to use geometry, just replace the ...


2

For this you need at least version 1.3.2 of Shapely, which was released 2014-05-13. The lines of code you are looking at were added in a commit "Allow LineStrings to take arrays of Points".


2

ST_Distance (folowing the documentation) - For geometry type Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units. For geography type defaults to return spheroidal minimum distance between two geographies in meters. So - if you'll feed it with geometry,4326 you'll get distance in units of 4326 ...


1

If "current" CRS should be TM65/Irish Grid, you have to save the shapefile under another name and that CRS, and add that to the canvas. Then you can add x and y coordinates to the attribute table using the field calculator. Alternatively, you can select the project CRS using Vector -> Geometry tools -> Export geometry columns. There is no direct way ...


1

This is probably answered in Empty geometries in GEOMETRYCOLLECTION which refers also to http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry. A practical use case for many GIS programs like QGIS which can only hold one sort of geometries on a single layer is to make it possible to import attributes into a new layer and initialize it correctly so it can ...


1

Qgis see your table two times, one with the_geom1 and one with the_geom2. When you upload the_geom1, you will see the_geom2 like a text.


1

There are two things wrong here: The Point constructor takes arguments of X and Y, while you're providing Y (latitude) and X (longitude), resulting in an object above the north pole The XY precision you've defined in the spatialRef object is four decimal places (1/10000th of a degree), which is exceedingly coarse for a circle with a 50 meter radius -- an ...


1

For each Polygon, Create a Feature Class from the polygon Convert Vertices to Points using, FeatureVerticesToPoints_management Run PointDistance_analysis, in_features and near_features can be the same feature_class Using the Data Access Search Cursor, Sort the Point Distance Table by Distance, descending Read the first record, it will have the FID for the ...


1

Alternatively, if you do not have an Advanced license and you do want centroids even if they fall outside the shape, there is another slightly more involved method. Open the polygon attribute table and create two new fields, X and Y. Right-click on each one in turn and use Calculate Geometry to calculate the respective X centroid coordinate and Y centroid ...


1

Sounds like you are using the wrong tool. To create a separate dataset of points that are the centroids of a polygon use the Feature To Point tool. It requires an Advanced license.


1

That's a feature in pgadmin/PostGIS - it won't show geometry column values if they are too long. It's mentioned in the PostGIS manual http://postgis.net/docs/manual-dev/PostGIS_FAQ.html#pgadmin_shows_no_data_in_geom


1

My lib PyGeoj is specifically meant as a geojson file reader and writer, with a simple API that turns the file contents into objects with attributes, so you don't have to deal with the dictionaries directly. It also has some convenience methods, like calculate and add the bbox for the entire feature collection or just for each feature. So for instance, the ...



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