Hot answers tagged

6

Run the command with -d switch https://postgis.net/docs/using_postgis_dbmanagement.html#shp2pgsql_usage -d Drops the database table before creating a new table with the data in the Shape file. for overwriting the table that you have created with your previous trials. The first error message tries to help ERROR: relation "geo_br" already exists.


6

There is a fairly large list of OSGeo Docker images here that are built on a variety of different base images. The page also contains information on the source, whether or not the image is on Docker Hub, and commentary on the project goals and status (e.g., under testing, works/doesn't work). One of these Docker images should fit your needs, or at least ...


6

First, you need to ensure your Docker container has it's ports exposed, so do something like: docker run -p 5432:5432 --name some-postgis -e POSTGRES_PASSWORD=mysecretpassword -d mdillon/postgis And now, depending on your platform, you should be able to connect to it using QGIS by setting the host to localhost, the username to postgres an the password to ...


4

If you are able to use Jupyter Notebook or Lab, I have made a "code editor simulator". Initially I made two ways of using it, one via folium and the other one via ipyleaflet, but I have been updating only the latter because it's the only one I actively use. It can be a little annoying to install, I haven't pulish that, but if you get to it, you can ...


3

You can edit your scripts with any IDE you want as long as you include git into your workflow. All the scripts you see are based in git repositories (see GEE docs): The Scripts manager stores private, shared and example scripts in Git repositories hosted by Google. You can see an overview of all the repositories you have access to at https://earthengine....


3

There's an example configuration of the Open Data Cube and Docker available called "Cube in a Box". You should be able to get something up using just Docker Compose, as shown below, but the above repository has an example of a Dockerfile, Docker Compose configuration and product definition and indexing scripts. version: '3' services: postgres: image: ...


3

I have a hunch about this, but you’ll need to try this out to see if it’s correct :-) As user30184 pointed out, it looks like you’re running a PostGIS query on a database without the PostGIS extension installed. The mdillon/postgis dockerfile copies a file (as postgis.sh) into the same directory as your .sql files. postgis.sh sets up a Postgres template, ...


2

Found the second problem, first one was the missing --net=host parameter to connect inner command with outside Postgresql, as @user30184 correctly pointed out. The second problem, not writing the KML file, was due to the wrong path in the file, which was /tmp/1/areas_desarrollo_indigena_2017_03_07.kml and since I added the -v /tmp/1:/data it was trying to ...


2

The problem is that localhost inside of your Docker container refers to the container, not the host where Postgres is running. If you add --net=host to your docker run commend, then your Docker container will use the host's networking stack, and localhost will work as you expect.


2

The tylere/docker-tmpnb-ee repository is not longer being maintained. Development has moved to https://github.com/gee-community/ee-jupyter-contrib


2

The following solution worked for me: Xvfb :99 -ac -noreset & export DISPLAY=:99 instalacia xvfb: sudo apt-get install python-pip sudo apt-get install xvfb xserver-xephyr vnc4server sudo pip install pyvirtualdisplay then in the code: gui_flag = False app = QgsApplication([b''], gui_flag) app.setPrefixPath('/usr') app.initQgis() if len(...


2

I found now a working solution for my problem. However to be honest I am not really convinced of this solution (but it is working). Currently I have used QGIS Server 2.18 but I think it should work similar with a QGIS 3 Version. My steps: git clone https://github.com/kartoza/docker-qgis-server create a folder with name "project" in the 2.18 directory but ...


2

This is how I found a solution: At shell I run: export QT_QPA_PLATFORM=offscreen Then, at a python script I did this: import os from qgis.core import * os.environ["QT_QPA_PLATFORM"] = "offscreen" QgsApplication.setPrefixPath("/usr", False) qgs = QgsApplication([], False) qgs.initQgis() This solution is based on another answer I found here After this ...


2

From: https://github.com/pyproj4/pyproj/issues/767, proj-util is the missing package. Based on the version compatibility matrix: https://pyproj4.github.io/pyproj/stable/installation.html#installing-from-source (see figure below), you have to use pyproj<3 with the version of PROJ you are using. Once proj-util includes PROJ>=7.2, you can upgrade to ...


2

You simply did not read the reference doc from Spatialite as I suppose you were expecting portability between PostGIS and Spatialite spatial SQL syntaxes. You are correctly loading your extension but in Spatialite, there is no ST_MakePoint function e.g http://www.gaia-gis.it/gaia-sins/spatialite-sql-5.0.1.html You will see that SELECT ST_AsText(ST_Buffer(...


1

I don't think you should store application state in a Docker container. And DB data kind of fits this. There's a post here, which says it's not best practice. using a Dockerfile allows you to formally modeling the image content and ensure you can rebuild/reproduce its initial state. So, the right way to do this would be to fill the DB as part of your ...


1

version: '3' services: db: build: . container_name: postgres-db environment: - POSTGRES_USER=username - POSTGRES_PASSWORD=mysecretpassword volumes: - ./data:/var/lib/postgresql/data expose: - "5432" Something like that. This assumes your Dockerfile is at the same level as your docker-compose.yml. The ...


1

The ubuntu-small dockerfile is built without SpatiaLite. Use ubuntu-full instead https://github.com/OSGeo/gdal/blob/master/gdal/docker/ubuntu-full/Dockerfile It seems to download libspatialite-dev and libspatialite7.


1

Use a docker-compose environment. To simplify things, work on the same host as your QGIS server docker. We will be using an off-the-shelf solution, provided by JWilder. The nginxreverse-proxy will: handle incoming https requests, route the SSL verification to the nginx_proxy_companion container/service, and then pass the underlying http data request to your ...


1

Posting what solved my issue. I wanted to install gdal version 2.0.x or above for R package sf. Usual yum install would install version 1.11.x. Hence, the need to build and install. I believe this should also work for anyone who wants to install gdal on RedHat machines. docker run --rm -it centos:7 bash yum -y install epel-release yum -y groupinstall "...


1

You need to have GDAL installed. Use before_script call to install GDAL: default: before_script: - apt update && apt install libgdal-dev


1

Try to add these lines: RUN echo LANG="en_US.UTF-8" > /etc/default/locale RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen For some more hints, see this Dockerfile: https://hub.docker.com/r/mundialis/grass-py3-pdal/dockerfile Edit 1, Nov 2019: A bugfix is on the way, see https://github.com/OSGeo/grass/pull/156 It has been ...


1

I have managed to produce a reproducible environment that, although it's not my perfect solution, at least gives me the primary things I want, with only a few limitations. Objectives Uses Docker Compose Has permission to write to a mounted volume used as a GRASS database. Has permission to read from a mount over ssh Can install extensions persistently Not ...


1

When using PowerShell on Windows the proper command needs to have quotes around the paths: docker run -t -v "$(pwd):/data" osrm/osrm-backend osrm-extract -p "/opt/car.lua" "/data/california-latest.osm.pbf"


1

It turns out I should use my IP address: http://192.168.99.100:8888/?token=.... Reference: https://www.reddit.com/r/docker/comments/a4gvnm/localhost_refused_to_connect/?utm_content=full_comments&utm_medium=message&utm_source=reddit&utm_name=frontpage


1

So the line which does the job is: sudo docker run --net=host -v /home/user/Documents/projectX:/data pdal/pdal:1.7 pdal pipeline /data/laz2pg.txt


1

the -v option maps the directory /data on the container to the directory /home/user/Documents/projectX on your host machine. It's just like having a shared folder with a virtual machine. That means that when you call pdal info /data/pt.las it's expecting to find a pt.las in the /home/user/Documents/projectX directory. As you won't have put in las2pg in ...


1

docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/openmaptiles-server call wizzard http://localhost:8080 choose "Advanced options" on the "Styles" page upload your style


1

I have myself created a Docker Image, which is available here: https://hub.docker.com/r/devdattat/docker-opengeosuite/ This is based on a Dockerfile, which can be accessed here: https://github.com/devdattaT/docker-OpenGeoSuite/blob/master/Dockerfile


Only top voted, non community-wiki answers of a minimum length are eligible