Quantcast
Channel: Question and Answer » shapely
Browsing all 16 articles
Browse latest View live

Shapely/ Python looping through a number of polygons

I am trying to loop through a set of polygons in shapely so using python) to determine whether they overlap or not. I do not want to do it manually as later i want to generalise the procedure and do...

View Article



Image may be NSFW.
Clik here to view.

Removing small polygons gaps in a Shapely polygon

I know this issue has been addressed before with different software, but I am looking for an approach with Shapely. I have a polygon with a very small gap on the interior of the shape: Here is a close...

View Article

Writing a shapefile using OGR, from Shapely Geometry – No feature added Error

I am trying to write a shapefile from a Shapely geometry using PyQGIS in the QGIS 2.6.0 console. Lines of code before the OGR method to write shapefile: extnt = poly.extent() # gives a QtRectangle...

View Article

Image may be NSFW.
Clik here to view.

Line vs. Polygon Intersection Coordinates

I am working with Python, Shapely and Fiona… Is there any way where I can give in an input of a line shapefile and a polygon shapefile, and get a result of the intersection points and their...

View Article

Area in KM from Polygon of coordinates

I have polygons from coordinates in (python shapely) that looks like this POLYGON ((24.8085317 46.8512821, 24.7986952 46.8574619, 24.8088238 46.8664741, 24.8155239 46.8576335, 24.8085317 46.8512821)) I...

View Article


Transforming Shapely Polygon and MultiPolygon objects

Is there an easy way of transforming Shapely objects (namely, Polygons and MultiPolygons) from one projection to another without having to dig around and extract coordinates by hand? In fact, I don’t...

View Article

Why is Shapely and contains_point not detecting point being on land?

I’m using the world shape file that can be found at https://trac.openstreetmap.org/browser/applications/editors/merkaartor-branches/merkaartor-0.14-fixes/share/world_shp/world_adm0.shp?rev=17052. I’ve...

View Article

How to find the distance of a point from the begning of a StringLine with...

I have a route (represented by StringLine) and a location (Point) and I need to find the progress of the location in the route. The progress is the distance in meters from the begning of the route. The...

View Article


Reading/writing utf-8 encoded data using Fiona?

So I have a ‘cpg’ file with my ‘in_file’ shapefile data (definitely set to ‘utf-8′). I was using ‘meta’ to create the same schema/crs as ‘in_file’…though it runs, my text fields are borked on anything...

View Article


How to measure distance using shapely

Reading the documentation…it looks like I should have this right, but I don’t. The example is: Point(0,0).distance(Point(1,1)) 1.4142135623730951 Based on this example I wrote this block (..note:...

View Article

how install shapely on windows so it can be imported from matlab?

i’m on windows 7/64. shapely doesn’t offer windows installers on their pypi page, even though they seem to have recently (github issues 104 and 109 — i don’t have the rep to post links. their pypi...

View Article

Valid shapely dumps WKT becomes None when used as input to QgsGeometry

I’m trying to produce a multipolygon feature in QGIS. I am producing filled contours with Matplotlib, taking the multipolygons representing each contour level, using shapely to produce WKT, and then...

View Article

What is Shapely library alternative in R?

I want to manipulate 2D geospatial geometries in R. I am used to using Shapely in Python but I am a newbie in R. Can you suggest Shapely alternatives for R?

View Article


geopandas/shapely: what units it uses/calculates for area and distance...

it looks like a silly question, yet I can’t find clear answer on that: what units geopandas/shapely use calculating distance/area between objects?

View Article

Creating spatial layer from MS SQL Server table?

I have a table in MSSQL that I am trying to use to create a spatial layer from using the QgsVectorLayer function to load the table as a layer, and then using Fiona to create a shapefile but I am having...

View Article


Calculating distances with lat/long in decimals and WGS 84

I need to calculate the distance between points of two different datasets, once with locations of towns, the other with locations of dams. Both are located in different countries in Africa. The more I...

View Article
Browsing all 16 articles
Browse latest View live




Latest Images