A library providing vector geometry services

learn more… | top users | synonyms

3
votes
1answer
59 views

inaccurate distance measurements in Python

I've tried several ways of measuring the distance between two points in my Django application and comparing the results to a reliable measurement. My numbers are way off. For example, I'm assuming the ...
3
votes
2answers
490 views

GDAL with GEOS support, pandas and VTK using python on Windows?

So far I have been using OSGeo4W shell (or OSGEO install) as really convenient way to use python together with additional packages, namely gdal, shapely, numpy, scipy and matplotlib. I was happy till ...
3
votes
0answers
15 views

Casting group of two polygons with rgeo returns nil

Here's an array of 2 polygons I'm trying to cast into a multipolygon (wkt string format). The polygons are in a linear CRS, SRID:3361 ["POLYGON ((990863.9961167622 709913.6373089257, 990983....
2
votes
1answer
26 views

What does the GEOS LineString “normalize()” routine really do?

What does the GEOS LineString "normalize()" routine really do? GEOS has virtual void geos::geom::LineString::normalize() with the documentation: A normalized linestring has the first point which ...
3
votes
0answers
43 views

Can I reorder the points in a GEOS LineString?

Using libgeos, when I buffer() a polygon and then getExteriorRing() [to make a slightly smaller outline copy of the polygon just inside the original], it seems that which point on the new geometry is ...
0
votes
1answer
41 views

Finding neighbors for non adjacent polygons in R [closed]

I'm looking for a method or function in r-project that create a neighborhood matrix from a group of polygons that don't touch each other, like polygons of set of blocks separated by streets in a town. ...
0
votes
2answers
47 views

Trouble getting shapely to run

I downloaded the GDAL complete Framework von Kyngchaos which also includes the GEOS Framework and shapely for python. I can import shapely without a problem, but when I try to perform some "geo ...
1
vote
0answers
23 views

geoPHP pointOnSurface always returns null

Using geoPHP with geos installed. pointOnSurface() for a valid polygon always returns null. While other functions such as centroid() work fine. Example: geoPHP::geosInstalled(); //true $...
2
votes
1answer
85 views

gBuffer(rGEOS) causing R to crash

I have downloaded a US federal lands data layer (fedlanp010g.shp.tar.gz) from http://nationalmap.gov/small_scale/atlasftp.html?openChapters=chpbound#chpbound In R, I am trying to create a buffer ...
4
votes
2answers
67 views

Create a new point from a reference point, degree and distance

I'm trying to calculate the coordinate of endPoint using the lat/lon of startPoint as a reference. I know the distance between the start and end points and I know the azimuth to the endPoint. I ...
1
vote
1answer
376 views

Python Gdal ERROR 6: GEOS support not enabled

I installed GDAL from here (https://pypi.python.org/pypi/GDAL/1.9.1) Before attempting the python GDAL I installed the prerequisite gdal libraries using Kyngchaos's description some time ago (http://...
1
vote
0answers
88 views

Error and kernel dies with shapely/geos inside Jupyter notebook

I have a Python 2.7 script (code below) that scrapes data from a table on the web and draws a map. It runs fine from the command line using $ python bears.py When I run the identical script from ...
1
vote
2answers
522 views

Polygon area calculation in Ruby (on Rails, rgeo, PostGIS and GEOS) in sqare meters

In a Ruby-on-Rails application, I need the area in square meters (or any other surface measure, be it ares, hectares, square kilometers, but not in pseudo surface measure like square degrees) of a ...
4
votes
2answers
1k views

GEOS Python: Taking Union of several geometries

I am using the GEOS/OGR library in Python. I have files full of geometries that overlap, and I want to convert these to files of geometries that don't overlap. The way I have been approaching this ...
3
votes
0answers
41 views

Building GEOS / GDAL halts on embedding manifest files [closed]

I'm trying to build GEOS and GDAL from source on a Windows machine. I have Visual C++ for Python 9.0 installed with Lib / Include / PATH environment variables established (as far as I am aware). But ...
0
votes
0answers
41 views

Understanding output point in polygon solution?

My question refers to an old solution which is provided in How do I find out if a given lat lon is in a KML Linear ring using shapely? Using python3 I needed to update the code somewhat to get this ...
0
votes
0answers
14 views

Trouble Changing Paths for geospatial libraries

I am currently using Python 2.7, Django 1.8 and Windows 7. I am trying to set the Windows environment variables, as per the instructions here . When I try to do this using the Powershell, I get the ...
1
vote
1answer
181 views

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 ...
2
votes
4answers
173 views

How to determine if two points are on the same side of a LineString?

I have two points, A and B, and a line string L. A line string is formed by a sequence of points such that consecutive points are joined by a straight line. This is the same as a LineString in Geos - ...
4
votes
4answers
589 views

How to install everything “geo” in Ubuntu?

I am new to ubuntu SAUCY and I must confess the transition from windows has not been really easy for me. on windows everything seems pretty much straight forward but I am getting frustrated because It ...
1
vote
2answers
166 views

Shapely (geos) crashes during unary_union

When attempting to union multiple polygons with Shapely 1.5.6 in Python 2.7.9, using GEOS 3.4.2, I get the following error in the underlying C++ code: Assertion failed: (!"should never be reached"), ...
2
votes
1answer
108 views

gTouches error without geometry error?

I have a map showing administrative boundaries (available here). I've loaded it into R and have attempted to run gTouches (from rgeos) to determine which areas are adjacent to which, but receive an ...
3
votes
2answers
444 views

geospatial libraries like postgis

I'm pretty comfortable with postgis, but I realized that for part of my application, having a database is pretty heavy. I'd like to be able to take a stream of Point objects and check against an in ...
1
vote
1answer
95 views

Gdal+Geos point in polygon test fails under MinGW64

I have to build a grid of points and remove the points that falls inside a polygon. Polygons are defined in a ESRI shapefile, points are in a list. This is how I make the test: OGRLayer *layer = ...
2
votes
1answer
1k views

GEOS_ERROR: TopologyException: Input geom 1 is invalid: Self-intersection at or near point

I'm using GeoDjango (but I guess this is from the geos library). I have a set of polygons that compose a city surface and I want to merge them into a single one. The code looks like this: polygons = ...
-1
votes
2answers
1k views

How do I import geos from shapely? [closed]

I clearly have geos installed under shapely, since I downloaded "Shapely-1.4.4.tar.gz". Also, the result can be seen in my directory in the correct path: C:\Python27\Lib\site-packages\shapely\geos....
2
votes
1answer
328 views

Shapely's simplify won't simplify any more

I have a multipolygon in shapely, and I want to simplify it until it has less than a certain number of points. When I use the preseve_topology=False argument to geom.simplify, I can get the number of ...
4
votes
3answers
257 views

Geometric Operations in GIS Systems

I have worked with 2D geometry for CAD - My questions are general and relate to understanding operations on geometric entities (lines). Should geometric operations such as line-line intersection be ...
1
vote
1answer
43 views

How to find points present in one layer but not in a second layer, using ArcGIS?

I have two layers, A and B, with B consisting of a proper subset of the points in A. How can I produce a third layer, C, consisting of just those points found in A but not in B. In R, I would just ...
6
votes
3answers
4k views

PostGIS non functional on Ubuntu 14.04

I am unable to create the PostGIS extension on new databases in Ubuntu 14.04: $ psql pg_testing -c "create extension postgis" ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1....
3
votes
1answer
774 views

Empty geometries in GEOMETRYCOLLECTION

I just noticed some strange behavior in PostGIS, with respect to WKT parsing. A GeometryCollection containing 1 or more empty geometries postgis_test=# SELECT ST_GeomFromEWKT('GEOMETRYCOLLECTION(...
2
votes
1answer
338 views

Installing QGIS 2.0 with the newest gdal and geos libraries

I want to install QGIS 2.0 on Ubuntu 12.04 LTS. I followed these steps until the final installation command. Before I compiled gdal 1.10, geos 3.4.2 and grass 6.4.3 on my own. In the synaptic ...
0
votes
1answer
2k views

How to use Google Maps projection with GeoDjango/PostGIS

I am building a web service with GeoDjango which involves user submitted events including a location. I created a model field for my location using django.contrib.gis.db: location = models....
4
votes
3answers
659 views

Install Shapely with GEOS on heroku

I have a web mapping app running on Heroku. My app is written in python. Using pip I was able to install various pure python libraries that were needed. I would now like to install Shapely too. ...
1
vote
2answers
92 views

geos_ts_c.cpp + spatialite Error

select distance(T1.Geom,T2.Geom) as Distance, T1.POI_ID, T2.LINK_ID from temp1 as T1, temp2 as T2 where T1.POI_ID = T2.POI_ID AND Distance < 100 temp1 having point geometry temp2 having line ...
1
vote
1answer
168 views

3D functions with SFCGAL in PostGIS

I have this setup: "POSTGIS="2.1.2 r12389" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER" on ...
1
vote
0answers
129 views

How to get full 16 bits range using RasterSymbolizer and ColorMap ramp?

I am attempting to get the full 16 bits values of my DEM (stored as TIFF files) rendered in WMS tiles (png format). For this I use GeoServer 2.5 and a RasterSymbolizer with a ColorMap of type "ramp". ...
0
votes
0answers
149 views

GEOS assertion failed

The following script fails, if I import the 'rasterstats' library. import rasterstats import ogr geom1 = ogr.CreateGeometryFromWkt('POLYGON ((415924.806155724043492 4489457.402624096721411,416359....
0
votes
2answers
533 views

Building CartoDB from source using updated dependencies on Ubuntu 13.10

I am attempting to build CartoDB from source on an Amazon VM for the first time in my life. For purposes of sanity, I want to use the same instance/database of postgres for both CartoDB and all of my ...
0
votes
1answer
471 views

Update GEOS to 3.4

I want to use the rgeos function gDelaunayTriangulation (which requires GEOS 3.4) on my Mac, but when I load rgeos it says: > library(rgeos) rgeos version: 0.3-2, (SVN revision 413M) GEOS runtime ...
5
votes
1answer
1k views

Wrap GEOS functionality into python

I've been looking on how to get GEOSExtractLine available in python. I looked into Shapely source to if it was available for it, but it's not. I'm trying to wrap this funcionality into Django, much ...
2
votes
1answer
1k views

Problem with loading OSM planet into PostgreSQL

I try download OSM planet into PostgreSQL database. I do all steps from instruction http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/ I also modify string "kernel.shmmax" ...
2
votes
1answer
1k views

How to update to QGIS 2.0.1 on Mac?

I'm trying to upgrade to the newest version of qGIS but get the following error message when I open the installer: QGIS requires the GEOS framework version 3.4 or newer. I've had no luck ...
7
votes
2answers
5k views

Dissolve polygons in QGIS (GEOS) with tolerance

I have a polygon vector layer representing the area inundated in a flood. The layer has been produced in a such a way that some of the areas are composed of multiple smaller touching polygons (see ...
5
votes
1answer
97 views

What are lazy geometries

What are "Lazy Geometries"? How are they different from other types of geometries? I'm an experienced Python/Django developer but am very new to the world of GIS, and understand that this is a ...
1
vote
0answers
365 views

Why does polygon.intersection(complex_linestring) split the linestring and mess up Z?

I have a complex (self crossing) line with Z values which I'd like to truncate to the area inside a box. The problem is Shapely splits the line into simple (non-crossing) sections and the Z value at ...
2
votes
3answers
1k views

Accessing GEOS functions in Python

The issue: I am using Windows 7, 64-bit operating system with Python 3.2. I must continue to use Python 3.2 because of a dependency with another API. I need some functions in GEOS that are not ...
1
vote
0answers
520 views

Get the distance between 2 WGS84 GEOSGeometries

I currently want to check if 2 given GEOSGeometry objects of type Point are within 100m of each other. (length flexible) Looking at previous asked questions on this topic, most of the answers were ...
5
votes
1answer
945 views

How to use GEOS/C++ to efficiently find all point pairs closer than a threshold?

Can anyone tell me how to use GEOS/C++ to efficiently find all point pairs in a dataset closer than a threshold distance d? I suspect this might involve quadtrees or rtrees but not quite sure how ...
3
votes
2answers
1k views

Checking if a point is in a circle

I'm using shapely to check if a point is in a polygon, but I also need to check if a point is in a circle. Checking the docs, I don't see how do that... Maybe I could create a circle? circle = (x,y)...