Tag Info

Hot answers tagged

4

Buffer the lines. Use Difference to subtract the buffer polygon from the original polygon (p0).


4

You need to understand the definition of the spatial predicates. What you're really want is to know if a line traverses the polygon (and not simply cross it) Using the JTS Topology Suite, you can see that in both cases the predicates are the same: the two lines intersects and crosses the polygon: and With the JTS Topology Suite, you can use the ...


4

The problem is that your data is still retaining the decimal degree numbers, although not units. Subsequent geometry calculations still use the same raw numbers that were associated with decimal degrees, but erroneously assume different units (meters). For example, if I say I'm 65 feet tall, I haven't actually grown, I'm just using different units than ...


4

You can also use the Multipart To Singlepart (Data Management) tool.


4

Under "Advanced Editing" there is a Button for "Explode Multi-Part features". Worked just fine!


4

For general centroid creation, QGIS QgsGeometry functions wrap respective calls to the underlying GEOS library: QgsGeometry * QgsGeometry::centroid() (definition) calls GEOSGetCentroid (definition) QgsGeometry * QgsGeometry::pointOnSurface() (definition) calls GEOSPointOnSurface (definition) The pointOnSurface() function is new for QGIS 2.4 and allows a ...


4

Network Analyst is an ArcGIS extension which can be accessed either through a Desktop application such ArcMap (for manual GIS routing analysis) or as a web service when exposed as an ArcGIS Server service. There are multiple approaches to expose the drive-time analysis service (by the way, the drive-time analysis is also called a "service area" in Esri ...


4

To do this I would use the Intersect (Analysis) tool. The ArcPy code will be: import arcpy homesFC = <your path to input Homes> districtsFC = <your path to input Districts> homesWithDistrictFC = <your path to output> arcpy.Intersect_analysis ([homesFC, districtsFC], homesWithDistrictFC)


4

I've figured out an algorithm for the grid approach using several Python tools. Rasterising and polygonising is done with rasterio, which is based on GDAL/OGR. Here are most of the imports: import rasterio import numpy as np from rasterio import features from shapely.geometry import mapping, shape from shapely.ops import cascaded_union from math import ...


3

The Select Layer By Location (Data Management) tool has various overlap_type values that you can use so I think you should try: COMPLETELY_CONTAINS —The features in the input layer will be selected if they completely contain a selecting feature. The input features must be polygons.


3

The Euclidean Allocation tool can accept your polygon as input, but you are right you need to set the values inside the polygon to NoData for this tool to work, otherwise it will pick up the values that are already there. First to feature to polygon, this will give values (any value, it doesn't matter, we're only interested in value or NoData) inside the ...


2

Do the following: add field "OldArea" to the parcels and populate with area values (Field right click - Calcualte Geometry) Perform Intersect with the Zones dataset add another field ("NewArea") and populate with areas after intersection (same way than #1) calculate the percentage = (NewArea/OldArea) * 100 in the new field


2

On the assumption that you have an Advanced level license (you do not specify otherwise), I think you should try the Near (Analysis) tool: Determines the distance from each feature in the input features to the nearest feature in the near features, within the search radius. ... Both input features and near features can be point, multipoint, ...


2

There are two things in that zip file: the "raw" raster data koppen_ics a layer file The layer file is just a pointer to the original data, with additional information about symbology (in this case, providing short text names for the various climate zones). Layer files are useful for saving a set of layers and symbology, but they can't be used if the ...


2

From a cartographic point of view, it is commonly assumed that the human perception of a line position is around 0.3 mm. For a given map scale of 1:20,000 or smaller, the USGS’ NMAS has established that 90% of all the points tested must fall within 1/50 of an inch (0.5 mm) (as measured on the map) to their known positions on the planet (see here). This can ...


2

There is a QGIS plugin called Digitizing Tools: The documentation says: Split selected features with selected line(s) from another layer applies to: line and polygon layer (multi or single part) Splits all selected features of the active layer with the selected line features of another layer. The splitting creates new features (not multi features). Each ...


2

Assuming you just want the general orientation of the polygon, rather than a specific segment... try the Minimum Bounding Geometry (Data Management) ArcGIS tool with the RECTANGLE_BY_WIDTH or RECTANGLE_BY_AREA geometry type and the MBG_FIELDS option. The MBG_FIELDS option will add the following fields to the output attribute table: MBG_Width—The ...


2

If you want every cell that contains a building to be switched on then don't use the polygons... Create centroids using Feature to Point for the polygons and use Point to Raster to generate the raster. This will guarantee that each cell that has a building centre on it will have a value. Optionally, if you want cells that contain part of a building but not ...


2

You will want to use a spatial join. The easiest way to do this is (IMO) is by right-clicking the neighborhood (polygon) layer and selecting Joins and Relates -> Join and then at the top (where it says "what do you want to join to this layer") change from tabular join to a spatial join (based on spatial location). Select your point layer. Then you have ...


2

If you want to select features by polygon using ArcObjects, you would typically use a spatial filter, which is very simple to implement. Here's an example in VB.NET, where pPolygon is your polygon object, and pLayer is the layer you wish to select features from: ' create the spatial filter Dim pSpatialFilter As ISpatialFilter = New SpatialFilterClass() ...


1

I'd suggest to poligonize the grid and to then intersect the polygon grid with the other input polygon layer. That should be much less trouble.


1

The mmqgis plugin is a bit more comfortable than the delimited text import. You can read from csv, and choose whether the result should be points, lines or polygons. EDIT The source data you now added to your question looks pretty much like Openstreetmap format. So you can add it using Add Vector Layer or the Openstreetmap plugin, part 2 and 3. Part 1 ...


1

Looks like the cell assignment method is CELL_CENTER (so polygon would need to be located over the cell center to be digitized). Using MAXIMUM_AREA will capture more of the polygons, although possibly not all since the cell size is so much larger relative to the polygons. You might get closer to the results you want if you first make a Minimum Bounding ...


1

I believe you can accomplish this by right-clicking on the neighborhood layer, choosing 'Joins and Relates', choosing 'Join', and in the Join Data box that pops up, choose 'Join data from another layer based on spatial location', select your buildings layer and then select 'Sum' as the attribute you want added as a numeric attribute. See also: ...


1

I do it this way by creating an Array of Point objects that form a line that closes back on itself, and then creating a Polygon object from that Array: # feature_info eventually takes the following form: [[734855.5142000001, 4744379.424500001], [740607.6685000001, 4744379.424500001], [740607.6685000001, 4736862.1753], [734855.5142000001, 4736862.1753]] ...


1

An "amusing" way to solve the issue of there being only one feature in your input feature class would be to make a feature layer to select every feature (in this case, 1) and then run select layer by location with the parameter selection_type="REMOVE_FROM_SELECTION". Then, GetCount() will return a 0 if the feature is indeed within the polygon (selected and ...


1

As it turns out, the solution is to group on the region id. I think I knew this once, but hopefully this can save someone else some Google time. ggmap(OhioMap) + geom_polygon(aes(x=long, y=lat, group=group), fill = 'grey', alpha=0.4, color = 'black', data = Counties.fort)


1

try this using ESRI.ArcGIS.DataManagementTools; FeatureToPolygon featureToPolygon = new FeatureToPolygon(); featureToPolygon.in_features = pInWorkspace.PathName + "\\" + pInFeatureClassName.FeatureDatasetName.Name + "\\Temp_Line_UnNamed"; featureToPolygon.out_feature_class = pInWorkspace.PathName + "\\" + pInFeatureClassName.FeatureDatasetName.Name + ...


1

My money is on overlapping polygons. You don't say what software you have access to, but in ArcEditor or ArcInfo (I may never get used to saying ArcGIS for Desktop Advanced, yuck) you could create topology with a "must not overlap" rule and find out that way. (That would also be how to fix it.) Or perhaps easier, fill them with different colors and make ...


1

If you are working with anything but points, you need to convert your shapes to WKT (well known text) columns, and then save that as csv. There is an expression in qgis 2.2 field calculator, it is in a geometry branch, named - geomtoWKT. Haven't tried it. If that doesn't work for you, try searching for other ways to get WKT columns. Just saving layer as csv ...



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