Hot answers tagged

9

Use ST_GeomFromGeoJSON. SELECT ST_GeomFromGeoJSON('{"type":"MultiPolygon","coordinates":[[[[-125045.48351212002,4577567.588141698],[-124816.19981552364,4577552.93014355],[-124765.99472517562,4577419.175847012],[-124842.47121534991,4577392.905406596],[-125045.48351212002,4577567.588141698]]]]}'); Returns: ...


6

Use ST_GeomFromGeoJSON select ST_GeomFromGeoJSON('{"type":"MultiPolygon","coordinates":[[[[-125045.48351212002,4577567.588141698],[-124816.19981552364,4577552.93014355],[-124765.99472517562,4577419.175847012],[-124842.47121534991,4577392.905406596],[-125045.48351212002,4577567.588141698]]]]}') Result: ...


5

ST_Area will use the units in your coordinate system, which as you say are degrees. So you have two options: transform your geometries to a coordinate system that uses feet or meters cast your geometries as geographies. ST_Area will then perform the calculation in meters. You then need to convert from square feet or square meters to square miles. Your ...


5

Your GeoJSON sample lacks information about the coordinate reference system, although you say it is SRID 900913. This is so-called Google Mercator or Web Mercator, which has been superseded by EPSG:3857, which I will use in this example. An important question is whether you really want Well-Known Binary, which does not include an SRID, or Extended Well-Known ...


3

If you run, using your original geometry: SELECT ST_AsText( ST_GeomFromEWKT('010600002031BF0D000100000001030000000100000004000000CE001744EA0212414BB26942EFE95641DD9AF00E49FF1441706072C152EC56413F53AF6BF9191441242DF04F7EC85641CE001744EA0212414BB26942EFE95641' )); you will see: MULTIPOLYGON(((295098.566494 ...


2

I know this is an old post, but there is a loophole. While arcpy Geometry objects do not support true curves, at 10.3, Esri implemented True Curves in the REST API, and therefore had to implement JSON support for them in FeatureSets. So you can "trick" arcpy into doing this for you if you create a curve in a JSON structure. Here's an example: create a ...


2

The document they are referring to, the "extended shapefile format document", comes with the API when you download it. Specifically, when you unzip the download, it is located at \doc\html\extended_shape_buffer_format.pdf.


2

You can create views on your table to access the different geometry types as separate layers in QGIS, for example: CREATE VIEW parcel_polygons AS SELECT id, name, geom::geometry(MultiPolygon, 4326) FROM parcels WHERE GeometryType(geom) = 'MULTIPOLYGON'; CREATE VIEW parcel_points AS SELECT id, name, geom::geometry(Point, 4326) FROM parcels WHERE ...


2

Here are a few links to get you started in the right direction. This is not simple Euclidean geometry question. See Charles F. F. Kinney's (cffk's) response to Finding projection of point to line? The C code Charles mentions is at this link to his intersect.ccp file His very detailed article entitled Algorithms for geodesics deals with math behind the ...


2

Point Distance - arcpy.PointDistance_analysis (in_features, near_features, out_table, {search_radius})


1

It is possible to draw a circle marker with buffer( $geometry ,0.01) This works also and draws a fixed polygon geom_from_wkt( 'POLYGON (( 377 380, 613 474, 343 115, 377 380 ))') I thought that building a polygon around a point would work like this: geom_from_wkt('POLYGON (( $x-0.01 $y-0.01, $x-0.01 $y+0.01, $x+0.01 $y+0.01, $x+0.01 $y-0.01 $x-0.01 ...


1

I was able to reproduce this effect, although I had to end up using the code: !shape.area@squaremeters! I got the following results in my table, with both fields being identical like you stated: Reading into the help guide, it looks like it could be an issue with the fact that the "Calculate Geometry" tool lets you utilize the coordinate system that ...


1

You got this error because you are trying to get an Extent of point geometry , so the Point geometry does not have an extent like (polyline,polygone ...) the school feature layer is a esriGeometryPoint Layer , so you cant work with extents here : I used the centerAndZoom map function to zoom to the returned point geometry , and i've add graphic for ...


1

You need to consider to migrate your data to a spatial database, like Postgis. Shapefile is not a supported format for WFS-T. Check here for more information.


1

SELECT ST_GeomFromText( ST_AsText( ST_GeomFromGeoJSON('YOUR GEOJSON') ), 4326)



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