Tag Info

Hot answers tagged

7

You can color different polygons in one shapefile differently - you don't need to put them in separate shapefiles. You do it through the Layer Properties and the Symbology Tab. Once you are on the Symbology tab, you have a number of choices of how to symbolize your data. Which option is best depends on the type of data you are working with the ...


7

You need to finish the polygon's construction with double click, right-click>Finish Sketch or F2 before saving edits.


5

Choose Layer > Save As... with format as CSV. Make sure 'Layer Option', 'GEOMETRY' is set to AS_WKT in the 'Save vector layer as...' window. The first column of the CSV file will now include polygon coordinates.


5

Try SAGA module Shapes - Grid -> Grid statistics for polygons - directly or via QGIS: One of statistics is Maximum - so the result will meet your expectations. Resulting table will be your input table with new columns named after statistics used in module (as far as I remeber SAGA doesn't obey the 8 character fieldnames limitation for shp - but you can ...


5

I suggest a two step process: Run Polygon Neighbors, which will generate a table that lists all the neighboring polygons for each polygon. Any small (box code) polygon that is completely surrounded by another (street code) polygon should show up only once in the results. Summarize the field listing the source polygons, using COUNT as the summary statistic ...


4

Use the plugin MMQGIS to export geometry to csv. I just try with your file, it works perfectly.


4

In the conversion world, what you've built is known as a "bowtie". If you really want that shape, you need to conform to topology rules by making a multipart polygon with "left hand rule" part vertices {0,0},{0.5,0.5},{0,1},{0,0} and {0.5,0.5},{1,0},{1,1},{0.5,0.5} (reverse the order [or just swap vertices 2 & 3 in each part] to generate "right hand ...


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

1) create polygons where you have a hole. This can be done with the "difference" tool (just manually draw a large polygon in another layer, or do it with the buffer tool). 2) select the polygons which are less than 200m² and merge those with your original shapefile (you can use the union tool). 3) use the dissolve tool to revert to a single polygon


3

To extract selective data from OSM you can use Overpass, you could also check download server of Geofabrik EDIT after some comments: In OSM boundaries of cities and villages are tagged with boundary=administrative + admin_level=*, unfortunately in different countries there are different values of tag admin_level. Here is table with meaning of this values ...


3

Two ways spring to mind. The most efficient depends on how many inner polygons you have. Clip: Select one of your existing 'lake' polygons then choose clip from the editor menu. Use a buffer distance of 0 and discard the area that intersects. This will clip a hole in any overlapping polygons. You will have to do this for each inner polygon. Cut Polygon ...


2

You can use this simple app to load a shapefile, and then export as X/Y's http://www.qarah.com/shapeviewer/#download


2

If you want a new shapefile, containing just some of the existing parcels, but no others, simply query for, or select the ones you want, then right-click on the layer select Data, then Export Data. If you have an existing shapefile follow the advise of @Maksim


2

I think you want to try using a balloon call out for a text box if you are not editing a feature then. It is nicely hidden below a couple of menus but is pretty useful: Once you have drawn the rectangle open the properties, select 'edit symbol' and follow the buttons in the image below to turn on the 'Balloon Callout'. When you've finished editing you can ...


2

Googling a bit I came to know this "ringer" experimental plugin for qgis, which seems to be good for your task. If this works (I did not test it), this would let you convert your holes into polygons. Then you would create a new field in the attribute table of the new polygons and calculate their area (with the field calculator). Then you would merge the hole ...


2

You might try Aggregate Polygons. It is located in the Cartography Toolbox, Generalization toolset. This requires an Advanced ArcGIS license. http://resources.arcgis.com/en/help/main/10.2/index.html#//00700000000s000000


1

Leaflet has a useful filter function that could easily be triggered based on some event. Alternatively, mapbox.js which is built on top of leaflet, has a useful setFilter function that you can apply to the a geojson feature layer.


1

This doesn't sound like an application for the raster datatype. I think what you really want is to use Create Fishnet (Data Management) to generate a vector which will overlay the other data. I would caution you about the use of such a tiny fishnet size. Unless your data is of submillimeter precision over a small area (as in an archeology dig), five ...


1

You have almost the whole process. After selecting the features you want to have in a separate shapefile (so that they are colored like in the picture), right-click the layer in Table of contents (the list to the left), --> Data --> Export data. Choose where to save the file. To save the rest to a different shapefile, use the highlighted button (switch ...


1

Assuming that white areas are small polygons ( if not they can be created) repeating Spatial join of whites with colored (share boundary with option, one to many) might work. After first join assign to white color of first colored. Append colored with subset of assigned whites. Remove subset from whites, etc. You might want to sort colored first, to set a ...


1

I think GDAL is the most mature open-source geospatial library that exists http://www.gdal.org/ http://trac.osgeo.org/gdal/wiki/GdalOgrInCsharp


1

If you're using ArcGIS Desktop 10.0 software as the tag on your question suggests, all you would have to do is bring that shapefile into ArcMap. Then, right click on the resulting layer for that shapefile and select "Properties..." from the bottom of the context menu. Then go to the "Symbology" tab in the Layer Properties menu that should open up. On that ...


1

Either make a selection of the polygons you need, right click, copy, then paste into your new shapefile in the interactive window. Or, use append, to add the selected polygons to a shapefile of your choosing.


1

you can create a convex hull using "minimum bounding geometry". This will create a polygon instead of a line, but you can either convert this polygon to line, or directly use "select by attribute" with the spatial query "touch the boundary of"


1

Use the syntax object_ name[,-(1:5)] to remove columns 1 to 5 or object_name[,-c(1,5)] to drop columns 1 and 5. See the example below (with comments): require(maptools) #load shapefile from maptools package to make a reproducible example. xx <- readShapeSpatial(system.file("shapes/sids.shp", package="maptools")[1], IDvar="FIPSNO", ...


1

If you have QGIS installed you may use OSGeo4WShell for this. The command would be something like this: ogr2ogr -f "ESRI Shapefile" C:/Temp/countries.shp C:/Temp/countriesZM.shp -lco SHPT=Polygon AND to convert to ZM it would be: ogr2ogr -f "ESRI Shapefile" C:/Temp/countriesZM_2.shp C:/Temp/countries.shp -lco SHPT=PolygonZ


1

I'd suggest you divide the problem into two parts: Generate a set of squares that represent the bounding boxes of each polygon ensuring they don't intersect. one way to do this would be generate a set of random points (1 per polygon) Put the first point into your master boundary. For each subsequent point, subdivide the box mid way along the closest axis ...


1

I use this when aggregating the shapes from the GADM2 dataset in SQL Server: SET @g2 = @g1.STBuffer(1).Reduce(1).STBuffer(-1).Reduce(1) the reduce() clears out the extended artefacts and speeds things up by a factor of 100x - a bit rough, but good for approximations.


1

I've also had luck using the QGIS Generalizer plugin (enable experimental plugins), and then: Vector > Geometry Tools > Polygons to lines Then use the Generalizer plugin to smooth the lines and vertices Plugins > Generalizer > Generalizer Algorithm: "Chaiken's Algorithm" Then turn the lines back into a polygons Vector > Geometry Tools ...



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