# Tag Info

## New answers tagged polygon

0

This Esri whitepaper might get you started on the path to your answer: http://www.esri.com/library/whitepapers/pdfs/multipatch-geometry-type.pdf Or if you want Delaunay triangulation, you can try out this tool: http://www.arcgis.com/home/item.html?id=6e9bc6cbf93d4939b2eb04ff8519be47

0

I think this is a problem best done as in vector. Imagine the scenario below: Cells are coloured by their value. First thing it is not clear if you want to ask the question of > 50% for individual cells or group of cells. So for example the polygon cover is > 50% for the red central cell but that is clearly part of a group of cells representing the same ...

1

Also, an easy way is to use Reclassify tool where you should click the button Classify and change the number of classes to 1. Click Ok. Now, the output raster can be easily converted using Raster to Polygon conversion Tool. ;)

0

Well, there might probably be an easier, more precise and elegant solution than mine, but what would definetly work is rasterizing, performing raster calculation (city plus blocks) and afterwards reclassify the result so that 1 still is 1 and 2 becomes no data. If you vectorize the result again you have a vectorlayer you want.

2

What defines which projection is a polygon based upon, and therefore which projection should apply to it? For these vertices, are the right polygons the left or the right ones? That depends on what purpose the polygons are going to used for. If their areas matter, then you should build them in an equal area projection like Albers. If 90 degree ...

0

Not a perfect solution, but one of these two things works for me in most cases: In QGIS, save the layer in GEOJSON format. But before saving, in the "save layer as" dialogue box, set the coordinate precision to 3 (15 is the default). This will have the effect of uniting vertices that are very close to eachother. Go to Mapshaper, upload the file, and hit ...

1

You can do this using the Network Analyst Extension. Build a network using your road layer (requires network analyst extension) Identify nearest polygon using point distance tool or near tool (or use existing point if known) Add nearest polygon point and postcode point as stops in the network solver then compute a route distance from your post code point ...

0

I think this answer published by @Zbynek completely response your question: How to reclassify only a part of a raster but keep the rest unchanged (ArcGIS or R) library (raster) # use state bounds from gadm website: # us = shapefile("USA_adm1.shp") us <- getData("GADM", country="USA", level=1) # extract states (need to uppercase everything) nestates ...

0

Based on your comment that refines your goal, I would rather suggest to project all your polygons in a single, equal area, coordinate system (e.g. Lambert Azimuthal Equal Area considering that you work in Europe), then you can shift your polygons for the comparison. Note that this projection will affect the shape of your polygons, but it should remain ...

0

Due to projection issues this approach is not 100% exactly. See notes at the end. Initial Situation: Feature class A: UTM 29N, showing polygon in Dublin Feature class B: UTM 32N, showing polygon in Oslo I would try this to compare the polygons visually: Add Feature class A to data frame a. Coordinate system of data frame a is UTM 29N. Zoom to the ...

0

Solution: Explicitly set the correct srsName gmlPolygon.getValue().setSrsName("EPSG:4326"); I also had to add srsDimension to the points since they had x, y, z: <ns1:pos srsDimension="3">32.23435 -110.34544 90.2</ns1:pos>

1

Since you cannot really define contingency based on common boundaries (using something like spdep::poly2nb), you could use the polygon centroids to build a k nearest neighbor relationship. This will unfortunately not account for polygon size but is a good place to start. require(spdep) require(rgdal) polys <- readOGR(system.file("etc/shapes/", ...

2

I'm still confident that the issue is the file path in attribute 'icon' (seeing as this method has worked on a data-set my end). Could you post an example string from this attribute so we can see if it should work? If this is the issue, or if you are having trouble editing this attribute, as you say above, I would recommend re-creating the attribute using ...

3

Here is a summary of the main differences. Note that both tools can split lines at intersection (it depends on the selected option): Input types: feature to lines: Lines and/or polygons polygon to lines : polygon only Number of input: feature to lines: multiple inputs polygon to lines : one Management of shared boundaries feature to lines: two lines* ...

1

Polygon To Line is a tool that convert polygon feature to line feature. It is stated clearly in Polygon To Line help that it Creates a feature class containing lines that are converted from polygon boundaries with or without considering neighboring polygons. Whereas Feature to Line not only converting polygons to lines, but also splitting line, ...

4

This feature is currently being evaluated to be integrated with QGIS 2.16 (and has good chances that it will be) will be part of QGIS with the 2.16 release and present on master builds from after Apr, 29 2016. For a solution compatible with 2.14 see below. Or if you want to use QGIS 2.14, use a Geometry Generator symbol layer. CASE WHEN ...

2

This lacking feature / bug is known and reported at https://hub.qgis.org/issues/9199 For now, you could create a centroid point layer, remove potential unwanted points and symbolize that.

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

0

I'm not sure weather you want to base the buffer off of each line or each corner. Here is the Polygon to Line tool that may be of use to you in this scenario. The result will give you some attributes of Left_FID and Right_FID which may be helpful if you are trying to classify each side. If you want to base a buffer off of the corners, you can use THIS ...

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

The point to line feature in arcgis requires data in a table to be ordered on the id for the group of points, i tried sorting the data but that didn't work still the point to line feature draws extra unnecessary lines but there was less extra liens this time,so my final solution was to use the point2one plugin in QGIS and that worked perfectly no extra ...

1

I think what you need to do is to clip raster by the polygon, to do that go to Data management toolbox -> Raster tools -> Raster Processing toolbox -> use the Clip tool found in the Analysis toolbox. You have the ability to use the selected features as the clipping extent. If a feature within the feature class is selected, and confirm that Use Input Features ...

4

You can do this with 2 tools, Feature to Polygon and Spatial Join First, run your polygons through Feature to Polygon. Delete any of the attributes you don't need from the output (I still got them even when I turned preserve attributes off): Then, run Spatial Join: The target features are the output of Feature to Polygon The join features are your ...

2

How many unique values are in your table? I would do an intersect. In your example, the new feature where all 3 overlap would be called green, red, black. Now if you have about a hundred unique values, you're going to have a lot of intersections. You will still be able to see which values are overlaps and which values don't.

0

it would be good to know more indepth about the work you'r trying to acomplish. Different projections might give different areas even tho the polygons are the same. Using equal area projection should Always result in same area. But here we go, yes you can draw a polygon. Create a new shape file as type polygon and edit its coordinate system to your liking. ...

1

If you're using ArcGIS: You can use the Near tool. You can also use the Spatial Join tool and under Match Options, choose Closest.

1

Thanks for the help. I think I've got it. To help anyone in the future, what I did was to join the database file with my existing shapefile map. Then i saved the Database file as a .csv with xy geometry. I had to edit the .csv file in excel to make sure the Date Format was correct. Then I saved the .csv file as a shapefile in QGIS because Timemanager only ...

0

If I put your data in a text file in the format name;WKT 1;MULTIPOLYGON (((29.219629 -2.390692 0,29.219668 -2.391022 0,29.219668 -2.391265 0,29.219563 -2.391476 0,29.21951 -2.391655 0,29.219594 .... ))) it displays fine in QGIS, and can be saved as ashapefile. You need to use semicolon as separator of the delimited text. QGIS reports the geometry type as ...

1

Thankfully it was just a stupid mistake. What happened was I had created a new Map Document to work with this particular polygon feature. When creating this new map document, I forgot to change the Coordinate system to use Feet as the Map Unit of measurement. So, when I was entering my Direction/Length, it was looking for Decimal Degrees and I was feeding ...

1

Run the Join Attributes by Location tool on the polygon and point layer (see this tutorial). This will give you an option to get the sum count of points within each polygon. After you have that you may setup your rendering based on the new sum field in the new polygon layer.

1

If you are using Openlayers see here. If you are using leaflet see here. For pure javascript see here or for NPM resources here or here There are other solutions beyond these but this should be enough to be getting on with.

1

To properly convert points into lines, you need to have a unique field which has a same value for each group of points so that ArcGIS can recognize that these group of points with a same value represents one line. Without a unique field, the output lines will be mixed lines crossing each other. You refer to the Points To Line help for more information. ...

0

The correct format for your data is not a Multipolygon but a simple Polygon with 3D coordinates 'POLYGON Z ((30.389763 -1.778877 0, 30.39029 -1.778926 0, 30.390932 -1.778926 0, 30.391557 -1.778909 0, 30.392068 -1.778876 0, 30.389763 -1.778877 0))' But as all the Z values = 0 you can use 'POLYGON ((30.389763 -1.778877, 30.39029 -1.778926, 30.390932 ...

1

The WKT you have there is not correct it seems, the syntax is wrong. You have a space-charakter at the wrong place. For example the -1.778877_0,30.39029 has a space, then a zero then the comma for the next coordinate pair. If this is intended and you want to have the Z-Value you need MultipolygonZ (that is not supported). Also its strange to have a ...

0

You can use Time Manager Plugin to animate your polygons based on time field. Also you can refer to this answer on how to setup the data to be used in time manager.

0

Attempt doing a spatial join between your line segments and the polygons. This should join the polygons features to the lines

0

I finally found an answer to this hidden away in a tutorial on WPS processes. There isn't much explanation! But it seems to work. public class PolygonTools { public static Geometry polygonize(Geometry geometry) { List lines = LineStringExtracter.getLines(geometry); Polygonizer polygonizer = new Polygonizer(); polygonizer.add(lines); ...

1

Ok, this turned out to be as simple as text search and replace: <Polygon><outerBoundaryIs><LinearRing> to <LineString> and </Polygon></outerBoundaryIs></LinearRing> to </LineString>

-3

It works to me when i avoid the mismatch SRID's. SRID's must be identical

1

Try the polygonize tool vector instead, it can give good results where the lines to polygons tool fails. You can find it by searching the processing toolbox.

1

If many of your lines generalize to one big square, this most probably means that their topology is not good (line are not exactly touching, therefore the polygon cannot be delineated). You could use the GRASS GIS v.clean command in order to snap the lines that are nearly touching. Make sure that you work on a copy because this modify the whole dataset. ...

1

I would suggest dissolving (Vector > Geoprocessing Tools > Dissolve) your water area shapefile to a single feature (as mentioned by @Matte) before running the Difference tool. You could do this inside QGIS but since it's a large file, I would probably suggest using ogr in the OSGeo4W Shell. Example: ogr2ogr -f "ESRI Shapefile" dissolved.shp input.shp ...

0

Should be possible. As you mention python i guess you have some knowledge there. The idea would be to read your point coordinates. Then create the shape of your desired buffer. You can build a loop for creating a shape for each point and within this loop you move your polygons to the coordinates of your points(as you have always the same shape it is easy to ...

4

I would create a middle point layer for snap purpose. Using this nice script of Paul Ramsey and updating for your use case: CREATE TABLE polygons ( gid integer primary key, geom geometry(Polygon, 4326) ); INSERT INTO polygons VALUES (1, 'SRID=4326;POLYGON((0 0,1 0,1 1,0 1,0 0))'); INSERT INTO polygons VALUES (2, 'SRID=4326;POLYGON((10 10,11 10,11 ...

1

I can import the file using the delimited text file import button, simply chose semicolon ; as the delimiter and WKT as the geometry type. This leaves you with the simple task of finding out what the projection of the data is. I tried searching the site but my spanish isn't that good.

2

You can change the appearance in JOSM via styles. There are already various different styles available. Alternatively you can create your own style. This affects only the map rendering in JOSM of course.

2

Check ST_Transform from the very helpful PostGIS docs: SELECT ST_AsText(ST_Transform(ST_GeomFromText('POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239, -71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571))',4326),2249)) As wgs_geom;

2

Speed up extracting raster (raster stack) from point, XY or Polygon Great answer Luke. You must be a R wizard! Here is a very minor tweak to simplify your code (may improve performance slightly in some cases). You can avoid some operations by using cellFromPolygon (or cellFromXY for points) and then clip and getValues. Extract polygon or points data from ...

1

I am trying to do the same as you in QGIS 2.14.1 and I am also having trouble. The native "dissolve" included in QGIS didn't work for me. The way that worked for me was using the GRASS function: Process --> Toolbox --> (in the sidebar) GRASS --> v.dissolve --> and follow along... I hope it helps someone.

Top 50 recent answers are included