Giter Club home page Giter Club logo

Comments (12)

anthonydb avatar anthonydb commented on August 15, 2024

@Pelil-tepes I had this issue come up once before with another reader. The cause was that they had moved only the file with the .shp extension into the folder they were importing from. Do you have all the associated files in the same folder?

from practical-sql.

Pelil-tepes avatar Pelil-tepes commented on August 15, 2024

They appear to be, I unzipped to the same location.
image

from practical-sql.

Pelil-tepes avatar Pelil-tepes commented on August 15, 2024

I did notice one possible issue. I am unable to import the data unless I select the "Load only attribute (dbf) data". Could this possibly strip the geom?

image

from practical-sql.

anthonydb avatar anthonydb commented on August 15, 2024

Yes, I believe that would indeed be the cause of no geom column because it's not reading the geometry from the file with the .shp extension. What kind of error do you get when you do not check that box? (edit)

I can fire up my Windows machine and try to replicate the issue.

from practical-sql.

Pelil-tepes avatar Pelil-tepes commented on August 15, 2024

from practical-sql.

anthonydb avatar anthonydb commented on August 15, 2024

@Pelil-tepes Please confirm you ran CREATE EXTENSION postgis; on your database. You can check if PostGIS is installed by running the query SELECT postgis_full_version();

from practical-sql.

Pelil-tepes avatar Pelil-tepes commented on August 15, 2024

from practical-sql.

anthonydb avatar anthonydb commented on August 15, 2024

If you added screengrabs, they're not displaying. Please upload them to this ticket so I can see the error.

from practical-sql.

Pelil-tepes avatar Pelil-tepes commented on August 15, 2024

image

from practical-sql.

anthonydb avatar anthonydb commented on August 15, 2024

OK, I'm going to assume this is an artifact of running in a Docker container. In the book, I specify install steps, and I am confident that if PostgreSQL and pgAdmin are installed according to the book that all will work. I unfortunately can't support alternate installations.

Is it possible for you to install PostgreSQL/PostGIS as instructed in the book?

from practical-sql.

Pelil-tepes avatar Pelil-tepes commented on August 15, 2024

from practical-sql.

Pelil-tepes avatar Pelil-tepes commented on August 15, 2024

I have made modifications to my docker file and confirmed it is working. I did install shp2sql to my windows PC and connect to the server using the IP and port for the SQL server. Hopefully, this information will be useful to others. I appreciate the assistance.

`version: '3.9'
services:
db:
container_name: PostgreSQL
image: postgis/postgis
mem_limit: 256m
cpu_shares: 768

healthcheck:
  test: ["CMD", "pg_isready", "-q", "-d", "bmmt_DB", "-U", "root"]
environment:
  POSTGRES_USER: root
  POSTGRES_PASSWORD: password
  POSTGRES_DB: my_DB
volumes:
  - /volume1/docker/postgresql:/var/lib/postgresql/data:rw
ports:
  - 2665:5432
restart: on-failure:5

`

from practical-sql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.