New answers tagged

0

The vertically separate, but 2-dimensional overlapping parcels have to combine and accumulate both units and occupants. To collapse them to a single 2-D building parcel you need to do the following. Extract the centroid of the parcels with the Feature to Point tool and keep all attributes Use the Spatial Join tool with the parcels as the target and the ...


0

Yikes. It's amazing to see the poor practices in place when creating parcel sets. There's a couple easy options here revolving around creating a copy of your feature class. You could make your selection, export to a new FC and then run a merge if you only have to calculate one use. If you need to find the areas for all of your land uses I would still create ...


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.


0

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


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 ...


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: ...


7

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: ...


4

If you want to transform coordinates to another SRID, you will use ST_Transform: SELECT ST_AsText( ST_Transform('010600002031BF0D0001000000010300000001000000050000008FEF9C07089AFEC0B90A9856E87251410F355DB1B395FEC0DCCEADDCED72514194BE3130A693FEC0DFD23127D072514114797186FA97FEC094E0C313CB7251418FEF9C07089AFEC0B90A9856E8725141' ...


1

You can use the ST_AsText function to get the WKT representation of your geometry, this will return the coordinates in whatever projection you have. (You will only get the latitude and longitude if your data is stored in a Geographic Coordinate system, SRID 4326 works for most cases) You can use this query to change SRID ALTER TABLE table     ALTER COLUMN ...


0

The workaround I figured out I still don't think is the ideal way to do it, but for now will work. Instead of using the Migrate Storage process in ArcMap, I simply opened up the catalog, right-clicked on my edited feature class/table in my connected db and selected "export" --> "to geodatabase (single)". In the export window, I was able open the optional ...


8

The Topology Checker plugin has an option to check if a layer contains multipart geometries. It is also possible to highlight multipart geometries.


5

Not tested but perhaps use something like this in the Python Console: layer = qgis.utils.iface.activeLayer() geom = QgsGeometry() if layer.wkbType() == QGis.WKBMultiPolygon: for feature in layer.getFeatures(): if geom.isMultipart(): print feature.id()


1

vince is right. when you need functionality that was introduced in a specific release of the ArcGIS API for JavaScript (or any API for that matter) the only way to get access to it is to utilize the version where its present. https://developers.arcgis.com/javascript/jshelp/new_v313.html


6

My solution involves a PyQGIS script that is faster and more effective than a workflow involving snapping (I gave it a try too). Using my algorithm I've obtained these results: You can run the following code snippets in sequence from within QGIS (in the QGIS Python console). At the end you get a memory layer with the snapped routes loaded into QGIS. ...


2

I realize you're asking for a QGIS method, but bear with me for an arcpy answer: roads = 'clipped roads' # roads layer hexgrid = 'normal-hexgrid' # hex grid layer sr = arcpy.Describe('roads').spatialReference # spatial reference outlines = [] # final output lines points = [] # participating grid vertices vert_dict = {} # vertex dictionary hex_dict = {} # ...


2

If you were to split the road line into segments where each segment was completely contained by the hexagon, your decision on which hexagon line segments to use would be whether the distance from the split road segment's centroid to each hexagon side's midpoint was less than half the diameter of the hexagon (or less than the radius of a circle that fits ...


5

I did it in ArcGIS, surely can be implemented using QGIS or simply python with package capable of reading geometries. Make sure that roads represent network, i.e. intersect each other at the ends only. You are dealing with OSM, I suppose it is the case. Convert proximity polygons to lines and planarise them, so they become a geometric network as well. ...


1

ArcGIS Desktop already has a tool that does this. It's called Feature Compare. You can limit it to only compare the Geometries. You could use the output from this tool to further scrutinize the geometry. For example, if Feature Compare finds geometry differences for features with ObjectID 142 (in both feature classes), you could then pump those features ...


0

A quick and easy way to detect geometry changes is to compare Centroid locations. Feature to Point is a good tool to create Centroids from Lines or Polygons. If the closest Centroid in the compare layer is greater than .001 (whatever tolerance you choose) then the geometry changed.


0

If I understand your code right, you are using a JSON representation of your geometry to compare old and new geometry. If python can't match the string to your list of strings, it then adds a -1 to your change field. I think using a json representation, or WKT or string, to compare geometry for changes might get tricky. What if the change was a reordering ...


3

ST_MakeBox2D already returns a geometry that is a polygon for PostGIS. The right syntax has points in lower left-upper right order but function does not seem to be strict with that. SELECT ST_MakeBox2D( ST_GeomFromText('POINT (0 0)'), ST_GeomFromText('POINT (1 1)')); "BOX(0 0,1 1)" SELECT ST_MakeBox2D( ST_GeomFromText('POINT (1 1)'), ...


1

Additional to ahmadhanb answer, you can create a buffer of a few degrees/km/miles to the "Polygon from Layer Extent", in this fashion you will have some space out of the most external vertices of your continental shapes (which is what you obtain). Then, you may apply "Difference" to this buffered shape to erase you continent polygons and obtain the ocean.


3

As a comment to an answer by @bugmenot a quotation from GML-SF document http://portal.opengeospatial.org/files/?artifact_id=11266, GML is more than simple features. In both GML and previous Simple Features (SF) specifications for OGC, such as Simple Features for SQL (SF-SQL) [10], features are considered to be objects which can have geometry and ...


3

GML is built on the Simple Feature geometry model. The SFM says that a self-intersecting polygon is not "simple" and thus not valid. So I would say no, GML does not allow that.



Top 50 recent answers are included