Comments (12)
@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.
They appear to be, I unzipped to the same location.
from practical-sql.
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?
from practical-sql.
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.
from practical-sql.
@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.
from practical-sql.
If you added screengrabs, they're not displaying. Please upload them to this ticket so I can see the error.
from practical-sql.
from practical-sql.
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.
from practical-sql.
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)
- Chapter 4: Performing the census import with COPY. HOT 9
- Chapter 4 csv usa_counties2010.csv HOT 3
- Chapter 13 regexp error HOT 5
- Chapter 13 tsvector HOT 5
- CH 4 Try it Yourself #2 HOT 1
- Chapter 3 Listing 3.1 HOT 6
- File access denied on MacBook Air using COPY HOT 5
- "Chapter 4: COPY us_counties_2010 Permission Denied Question" HOT 2
- Windows File/Folder Permissions for COPY HOT 3
- Chapter 5 Median Aggregator Code Incompatible with PostgreSQL14 HOT 3
- Error in executing factorial part of listing 5-3 HOT 1
- Chapter 13: Datestyle Question HOT 2
- Chapter 15: Python program keeps closing database connection HOT 3
- Installation Instructions for PL/Python Extension
- Chapter 4: Missing data column and unable to import CSV
- Chapter 4: ERROR: value too long for type character varying(3) CONTEXT: COPY us_counties_2010, line 2, column state_us_abbreviation: "STUSAB" HOT 3
- CHAPTER 8 HOT 5
- Ch. 4 Copy | Mac OS | Error 42P01 HOT 4
- Chapter 8: Try It Yourself Question 2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from practical-sql.