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

geoDjango on heroku

I'm using heroku to develop a django backend. I would like to enable geoDjango to use spatial feature with my models. I followed all the steps that are describe on the django and heroku docs but I'm still getting an error when I want to run…
4
votes
1 answer

Pip install --global-option="-L/": option -L not recongnised

I am trying to install cartopy on a Windows machine, and have previously installed QGIS and GEOS through OSGeo4W64. Now, when I try installing cartopy, I get the following error: fatal error: 'geos_c.h' file not found As mentioned, GEOS does exist…
borizzzzz
  • 620
  • 1
  • 6
  • 17
4
votes
1 answer

How Do I Make A Rectangle in GEOS?

How do you make a rectangle using the GEOS library's C++ API?
Richard
  • 56,349
  • 34
  • 180
  • 251
4
votes
1 answer

Find holes in a union of rectangles?

I have a number of random rectangles (black) in and around a unit square (red) and need to extract all the polygonal regions inside the unit square that are not covered by any rectangle. It looks like this can be done with Shapely and I've gotten…
nickponline
  • 25,354
  • 32
  • 99
  • 167
4
votes
1 answer

How to create a Polygon with holes GEOS library

I'm using the GEOS library, and I'm trying to create a Polygon with a hole in it. As per the documentation, I have to pass in a LinearRing, which represents the outer "shell", and a std::vector, which represents the holes in the shell.…
saiarcot895
  • 554
  • 5
  • 16
4
votes
0 answers

GeoDjango GEOS API Abort Trap GEOS function errors

I'm running into some repeated problems in my geodjango apps that seem to be originating with GEOS. I am receiving errors that do not include stack trace information so I'm not sure how to go about debugging them. I've been able to isolate the…
BenjaminGolder
  • 1,573
  • 5
  • 19
  • 37
3
votes
1 answer

Is is possible to use django's GEOSGeometry as an independent product

Is there a way to use django's GEOSGeometry without installing all of Django? I know it is possible to use it independently and I could trim out the rest of Django, but since it is quite useful, I wonder if somebody did this already. Basically, I…
rapto
  • 405
  • 3
  • 15
3
votes
1 answer

Getting "AttributeError: module 'shapely.geos' has no attribute 'lgeos'"

I am trying to do this exercise from momepy (https://github.com/pysal/momepy/blob/main/docs/user_guide/getting_started.ipynb), but on the third codeblock f, ax = plt.subplots(figsize=(10, 10)) buildings.plot(ax=ax) ax.set_axis_off() plt.show() I…
Reuben
  • 81
  • 9
3
votes
1 answer

PostGIS testing if point intersects scaled polygon sometimes gets wrong answer

I need an algorithm where I can check if a point falls within a polygon within a small tolerance (meaning the point is completely within the polygon or sufficiently close to the border). To implement this, I was planning on using the st_scale…
jkoeller
  • 68
  • 4
3
votes
1 answer

How to fix spherical geometry errors caused by conversion from GEOS to s2

I'm having the same problem as How to resolve spherical geometry failures when joining spatial data My code that used to work now doesn't work with the conversion from GEOS to s2. I'm not sure how I would create a reproducible example of this error.…
canderson156
  • 1,045
  • 10
  • 24
3
votes
0 answers

ImportError: dlopen(...), Symbol not found: _GEOSArea, Referenced From ..., Expected in: flat namespace

I'm trying to load in rasterio but for some reason gets this weird error. Anyone knows what this is, what this means and what's the best solution for it? File "/opt/homebrew/lib/python3.9/site-packages/rasterio/__init__.py", line 9, in
M. Fire
  • 117
  • 2
  • 6
3
votes
0 answers

install from source spatial R libraries on Mac M1 with geos/proj/gdal from homebrew

I'm trying to install sf package from source to run it with latest version of geos/gdal/proj which were installed by homebrew. I'm using an Apple Silicon M1 computer with MacOS BigSur 11.3. and it seems that my issues are linked to this new Apple…
Sami
  • 31
  • 2
3
votes
2 answers

GeoDjango: Speedup GEOS's Geometry operations

I'm developing a spatial ranking application using GeoDjango + PostGIS. Basically what it does is that it retrieves all geometries within the query bounding box, computes the similarity score using a custom function I created, and then return the…
ejel
  • 4,135
  • 9
  • 32
  • 39
3
votes
2 answers

rgeos::gBuffer shrink without loss of points

I need to be able to shrink a polygon of lat/lon data without loss of points; more the point, I need the points to be effectively "smooshed" in the correct direction. Typically, gBuffer works fine, but there is no assurance on the number of points…
r2evans
  • 141,215
  • 6
  • 77
  • 149
3
votes
1 answer

Is a GeoDjango MultiPolygonField supposed to accept a Polygon geometry?

When I try to set a Polygon on a MultiPolygonField the following exception is raised: Traceback (most recent call last): File "", line 1, in File…
MattRowbum
  • 2,162
  • 1
  • 15
  • 20
1 2
3
15 16