Tag Info

Hot answers tagged

8

Edit: originally misread problem. Basic license workaround (Advanced license alternative: Erase) below: Union both layers Edit, select (those where FID_circleLayer <> -1 and FID_parcelLayer = -1, using selection type "are within (Clementini) the source layer feature") and delete.


5

Here's a pared down version of @crmackey's answer. The polygon layer is called 'POLY1', and should be the only thing you need to change to get an output point file of farthest vertices - it creates centroids on-the-fly: >>> points = [] >>> with arcpy.da.SearchCursor("POLY1",['SHAPE@']) as cursor: ... for row in cursor: ... ...


4

Alpha and color! Enjoy digitizing :-)


4

For the first part of your question: What about ST_LongestLine using the same geometry twice as input? SELECT ST_Length(ST_LongestLine( (SELECT geom FROM mylayer WHERE gid=1), (SELECT geom FROM mylayer WHERE gid=1)) ); For the second part of your question: Concerning the calculation of the average width of polygons some interesting answeres can ...


4

Using the field calculator is the way to go: No ID was given in Digitize every features without any entering any Id. Before export, update unique Ids with the expression, '$Id' using the field calculator. Some ID's already given in If you have already ID's you can use '-$Id'. Make sure you just select new Features what means that that are 'NULL' ...


3

According to the documentation (chapter 7.3), there are several geometry accessors which might meet your criteria, depending on whether the geometry is a collection, a polygon, or a multi-polygon: ST_NumGeometries - If geometry is a GEOMETRYCOLLECTION (or MULTI*) return the number of geometries, otherwise return NULL. ST_NumInteriorRings - Return the ...


3

Use the geometry accessor ST_NumGeometries. For example SELECT ID, ST_NumGeometries(shape) FROM myTable If your geometries contain geometry types other than polygons, you will need to break them up and keep only the polygons before counting. But from your question this would not be required.


3

Maybe you can modify pySkeleton by Olivier Teboul to suit your needs. I haven't had the chance to look at the actual code but from what he says it should be pure Python.


3

It depends on your license. If you have an advanced license you should have a tool called Erase. Use this tool with both of your datasets and you will get the correct result. If you do not have that tool, please let me know, and I will edit my answer to explain a workaround! EDIT: For those who do not have access to the Erase tool with their license, here ...


3

The reason are multiple overlaps. If you select ones with STAT_LEVL_=0, they are countries, e.g. NUTS_ID=DE is Germany. They are 34 largest polygons containing smaller levels, i.e. STAT_LEVL_= 1 (115), 2 (317) and 3 (1461). Select level you'd like to work with, they are overlaps free. However some of them are multipart features, e.g. FR(ance), because it ...


3

For part one use ST_MaxDistance Returns the 2-dimensional maximum distance between two linestrings in projected units. If g1 and g2 is the same geometry the function will return the distance between the two vertices most far from each other in that geometry. Example: SELECT gid, ST_MaxDistance(geom, geom) AS "Max Length" FROM layer


2

I would like to add to vinayan's post and briefly mention the rownum function, as it is very similar and in some cases might be a little more convenient. id returns the Feature ID, meaning that it always starts at zero. rownum returns the number of the row, meaning that it starts at one. So, basically, if you want the auto-increment to start at 0 go ...


2

You need to make them individual polygons, use Multipart to Single Part to explode the geometry into individual geometries. Intersect the line with the single part polygons which will join attributes of the polygons to the lines; in basic and standard license you are limited to two layers but that should be fine for this task. After the intersect you ...


2

With ArcGIS for Desktop Advanced, you could Convert all depression lines vertices to points (with Feature Vertices to Points) Convert all vertices back to lines (with Points to Line, with the Close Line option checked) Revert the direction of all lines (with Flip Line).


2

You can group points using either the recursive query or PL/PLGSQL procedure described in the answers to this question. Just substitute ST_DWithin for ST_Intersects/ST_Touches, as appropriate. If you're comfortable trying something experimental, you could build PostGIS with purpose-built functions to solve this problem: see the ticket on trac (code ...


2

If your data is stored in your SQL Server database as native spatial data, you can certainly do this. Assuming your territories (T) and sub-territories (ST) have attributes for their name and/or type, my suggestion would be along the lines of: Create a view (a dynamic table in your database) that joins your two polygons together using a join, where the ...


1

I'd say clip the parcels to the Circle, then: In both ArcGIS and QGIS you can use the Symmetrical Difference tool. The ArcGIS tool will require an Advanced/ArcInfo license. The QGIS tool is free!


1

If GISGe's solution works, I'd go for it. Nevertheless, if you still need a solution to remove the holes from polygons, you can just run the union tool and unselect the "gaps allowed" checkbox.


1

In the javascript code the array is treated as a string so try to parse this sting as json before using , then assign the result to coordinates . So if your result in success function is result , parse its coordinates attribute before using it this is example how to do so : result = { "type": "FeatureCollection", "features": [ { ...


1

This worked for me. The script will create an output point feature class that returns the point that is farthest from the centroid for all polygons: import arcpy import os import sys import traceback import math from datetime import datetime as d arcpy.env.overwriteOutput = True def Message(msg): print str(msg) arcpy.AddMessage(msg) def ...


1

If the responses by @joseph and @Simbamangu does not point you in the right direction: Are your polygon multi-part or single-part features? If you have one NUTS region with multiple separate polygons, QGIS will create one centroid for each. If your data include multi-part polygons you will likely get a single centroid with the centroid in the center of ...


1

Assuming I'm understanding the question correctly, this can be easily achieved using FME and the Generaliser transformer. If you use the "Thin" (or maybe "ThinNoPoint" depending on your use-case). This will remove any points that are more than 5km from the next. ...


1

1) Enable vertex snapping on the feature 2) Use the Node Tool and drag the vertexes from the right polygon to the one on the left (the snapping will allow you to place them exactly on top of each other) 3) From the Advanced Digitizing tools use the Merge Selected Features tool (note that you have to select both features first!) EDIT: Screenshots of the ...



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