Questions tagged [geos]

A topology processing library: Geometry Engine - Open Source

From GEOS homepage:

GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

It has at least Python bindings: geoDjango.

GEOS has multiple other meanings in computing, starting from a graphical operating system for Commodore C64, but they are less relevant to SO today.

228 questions
6
votes
1 answer

centos libgeos repository missing

On centos 7.3 minimal trying to install shapely or geopandas requires access to https://github.com/libgeos/libgeos libgeos. Trying to install this via sudo yum install libgeos-dev tells me that this package is not available. It seems that I am…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
6
votes
3 answers

portion of a raster cell covered by one or more polygons: is there a faster way to do this (in R)?

Pictures are better than words, so please have a look at What I have is a RasterLayer object (filled with random values here for illustration purposes only, the actual values don't matter) a SpatialPolygons object with lots and lots of polygons…
Where's my towel
  • 561
  • 2
  • 12
6
votes
2 answers

Python GEOS ImportError

I'm getting this error: ImportError: Could not find the GEOS library (tried ""geos_c"", ""libgeos_c-1""). Try setting GEOS_LIBRARY_PATH in your settings when I run: from django.contrib.gis.geos import * pnt=GEOSGeometry('POINT(23…
Bruce
  • 565
  • 2
  • 8
  • 23
5
votes
1 answer

3D geometric topology (e.g. intersection) in Python

I am using GEOS (in Python/Django) to manipulate some 3d elements. All topological operations work perfectly in 2D. So, I created a simple MultiPolygon with 3D polygons (very simple in fact, it is just a collection of vertical planes), and a…
sebpiq
  • 7,540
  • 9
  • 52
  • 69
5
votes
1 answer

Installing a fully functional PostGIS 2.0 on Ubuntu Linux GEOS/GDAL issues

I have been working on getting postgis 2.0 up and running on an ubuntu-maverick-amd64 linux server for about a week now. I am going for raster and topology support. I used the following to configure: sudo ./configure --with-raster --with-topology…
THX1138
  • 1,518
  • 14
  • 28
5
votes
5 answers

Install Cartopy & dependencies on Windows

I want to install Cartopy on Windows, which has some dependencies according to http://scitools.org.uk/cartopy/docs/latest/installing.html#installing. When using pip install cartopy in the cmd prompt, it gives an error where it wants me to install…
A T
  • 281
  • 3
  • 11
5
votes
3 answers

OSError when trying to pip install shapely inside docker container

Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so'] using the python:3.5.1 image I am trying to run a container that includes among other things it installs in requirements.txt shapely. When the docker…
lathomas64
  • 1,612
  • 5
  • 21
  • 47
5
votes
2 answers

For each point in one data set, calculate distance to nearest point in second data set

Trying to find, for each point in a SpatialPointsDataFrame, the distance to the closest point in a second SpatialPointsDataFrame (equivalent to the "nearest" tool in ArcGIS for two SpatialPointDataFrames). I can do the naive implementation by…
nick_eu
  • 3,541
  • 5
  • 24
  • 38
5
votes
2 answers

Strip Z dimension on GeoDjango (Force 2D geometry)

In my project I need to import some geometry from shapefiles. Some of these are MULTIPOLYGON Z type, but all Z coordinates are 0-value. When I try to save the geometry, I get the error: "Geometry has Z dimension but column does not" What is the…
Jônatas Castro
  • 473
  • 3
  • 14
5
votes
1 answer

Shapely intersections vs shapely relationships - inexact?

I wonder if I am thinking the wrong way or if this is a bug: I have a linestring and a polygon, I create the intersection points of the line and the polygon's boundary These intersection points should intersect (at least touch) the polygon's…
sal
  • 1,199
  • 1
  • 13
  • 31
5
votes
1 answer

Compiling geos without root CentOS

I have been trying to compile geos on my restrcited(no root) environment and I am having some difficulties... I did the following wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 tar jxf geos-3.4.2.tar.bz2 cd geos-3.4.2 nano ~/.bash_profile #…
delmalki
  • 1,326
  • 1
  • 13
  • 31
5
votes
3 answers

heroku PostGIS syncdb error

I am having trouble getting a simple GeoDjango app running on heroku. I have created the postgis extension for my database but I am not able to run syncdb without getting the following error: from django.contrib.gis.geometry.backend import…
Jeff Ames
  • 1,555
  • 11
  • 27
4
votes
3 answers

'module' object has no attribute 'OSMGeoAdmin'

The enviroment is as follows: **Windows 7** PATH=C:\Python27\;C:\Python27\Scripts;C:\Python27\Lib\site-packages\MySQLdb;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\OSGeo4W\bin **python…
4
votes
1 answer

Error encountered checking Geometry returned from GEOS C function "GEOSGeom_createLinearRing_r"

Trying to generate a polygon field for my region and cities for geotagging. Idea is to save the coordinates separately from Gmaps. Then use them to generate a region polygon. For regions like NCR in India, you have multiple cities like Delhi,…
Nayan Goenka
  • 85
  • 2
  • 11
4
votes
1 answer

Is there a better way for handling SpatialPolygons that cross the antimeridian (date line)?

TL;DR What is the best way in R to handle SpatialPolygons intersecting/overlapping the anti meridian at +/-180° of latitude and cut them into two sections along that meridian? Preface This is going to be a long one, but only because I'm going to…
Where's my towel
  • 561
  • 2
  • 12
1
2
3
15 16