geos

Find holes in a union of rectangles?

眉间皱痕 提交于 2021-02-07 08:22:31
问题 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 to the point when I have the union of the rectangles (green) but I'm not sure how to subtract that from the unit square and retrieve a list of polygons. Here is my code to generate the test data: import pylab import random from matplotlib import

Find holes in a union of rectangles?

女生的网名这么多〃 提交于 2021-02-07 08:21:30
问题 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 to the point when I have the union of the rectangles (green) but I'm not sure how to subtract that from the unit square and retrieve a list of polygons. Here is my code to generate the test data: import pylab import random from matplotlib import

Shiny deployment error: upgrade GEOS to 3.6.0 or later while installing package ‘lwgeom’

余生颓废 提交于 2020-07-22 06:12:43
问题 I have a shiny app that runs fine on my computer. I use packages sf , leaflet , and tmap . One of these requires the package lwgeom as a dependency. While installing the package lwgeom , shiny deployment gives me the following error message. What is GEOS ? And how can I upgrade GEOS to 3.6.0 or later? Building R package: lwgeom (0.2-4) /mnt/packages/build /mnt * installing to library ‘/opt/R/4.0.0/lib/R/library’ * installing *source* package ‘lwgeom’ ... ** package ‘lwgeom’ successfully

cx_freeze exe file works in anaconda prompt but not in windows cmd command prompt?

喜欢而已 提交于 2020-04-16 05:03:22
问题 I have spent most of the day trying to compile an exe file from my python script and running it through the vanilla cmd command prompt. I finally managed to create the exe-file, but weirdly it only runs in the anaconda prompt and not in the cmd. Here is the full error message/traceback: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 14, in run module.run() File "C:\ProgramData\Anaconda3\lib\site-packages\cx

cx_freeze exe file works in anaconda prompt but not in windows cmd command prompt?

六月ゝ 毕业季﹏ 提交于 2020-04-16 05:03:13
问题 I have spent most of the day trying to compile an exe file from my python script and running it through the vanilla cmd command prompt. I finally managed to create the exe-file, but weirdly it only runs in the anaconda prompt and not in the cmd. Here is the full error message/traceback: Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 14, in run module.run() File "C:\ProgramData\Anaconda3\lib\site-packages\cx

Installing GEOS on heroku cedar

耗尽温柔 提交于 2020-01-05 03:50:25
问题 we have troubles in installing the GEOS library on heroku cedar stack. We followed this guide: https://devcenter.spacialdb.com/Heroku.html and it didn't work. We noticed that the path (/app/tmp/geos) stored in the provided geos binaries was wrong, so we built our own binaries with vulcan. We changed parameters (BUNDLE_BUILD__RGEO) accordingly, but we weren't able to make it work. We even hardcoded geos paths in our custom rgeo gem without any success We also tried other buildscripts (https:/

PostGIS upgrade 2.2.1 -> 2.5.0 Database Import Errors

旧时模样 提交于 2020-01-04 14:18:32
问题 I'm moving a database from PostGIS 2.2.1 to 2.5.0 (PG 9.6). I pg_dumped the old database and am using pg_restore to import it. Everything appears to go fine but I'm getting these two errors. Is this something I need to worry about or can just ignore them? pg_restore: creating AGGREGATE "public.accum(geometry)" pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 4925; 1255 348862 AGGREGATE accum(geometry) aed pg_restore: [archiver (db)]

'module' object has no attribute 'OSMGeoAdmin'

送分小仙女□ 提交于 2020-01-03 16:46:51
问题 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 2.7** 'C:\\Python27\\lib\\site-packages\\bitstring-2.1.1-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\virtualenvwrapper-2.11.1-py2.7.egg', 'c:\\cygwin\\home\\username\\__prjs\\flt\\requirements\\src\\djangoembed', 'C:\\Windows\\system32\

Problems installing rgeos and rgdal on Mac OS X Lion

Deadly 提交于 2019-12-24 00:56:59
问题 I'm trying to install the rgeos package (and the rgdal) package. I have a macbook pro running os x 10.7.1 and I have the latest version of R, 2.13.1. I am following the instructions from this site: http://lostingeospace.blogspot.com/2011/08/rgeos-on-macos-x.html I have installed the latest GDAL complete framework 1.8 from http://www.kyngchaos.com/software:frameworks and have downloaded the source file rgeos_0.1-8.tar.gz from CRAN. In terminal, I input the following, as per the instructions:

Problems installing rgeos and rgdal on Mac OS X Lion

纵饮孤独 提交于 2019-12-24 00:54:27
问题 I'm trying to install the rgeos package (and the rgdal) package. I have a macbook pro running os x 10.7.1 and I have the latest version of R, 2.13.1. I am following the instructions from this site: http://lostingeospace.blogspot.com/2011/08/rgeos-on-macos-x.html I have installed the latest GDAL complete framework 1.8 from http://www.kyngchaos.com/software:frameworks and have downloaded the source file rgeos_0.1-8.tar.gz from CRAN. In terminal, I input the following, as per the instructions: