Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when importing a Latin 1 shapefile zip #2

Open
rogerfischer opened this issue May 13, 2016 · 2 comments
Open

Problems when importing a Latin 1 shapefile zip #2

rogerfischer opened this issue May 13, 2016 · 2 comments

Comments

@rogerfischer
Copy link

rogerfischer commented May 13, 2016

Hi Keith,
Thanks for your great work!
I wanted to import this shapefile here: http://statbel.fgov.be/en/binaries/scbel01012011_gen13_tcm327-275679.zip into mapquery.

And got this error message:

{"status":"error","message":"Command failed: shp2pgsql -W "latin1" -c -D -s 4269 -I ./shapefile-imports/scbel01012011_gen13_tcm327-275679/scbel01012011_gen13.shp public.temp | psql -h localhost -p 5432 -d mapquery

So I suspect that the belgian Latin 1 names caused Mapquery some trouble.

@shockwavemoto
Copy link

Hi Keith,
Thanks for your great work!
I wanted to import this shapefile here: http://statbel.fgov.be/en/binaries/scbel01012011_gen13_tcm327-275679.zip into mapquery.
And got this error message:
{"status":"error","message":"Command failed: shp2pgsql -W "latin1" -c -D -s 4269 -I ./shapefile-imports/scbel01012011_gen13_tcm327-275679/scbel01012011_gen13.shp public.temp | psql -h localhost -p 5432 -d mapquery
So I suspect that the belgian Latin 1 names caused Mapquery some trouble.

did you try configuring psql again because it might also fail because of psql and you might not be able to understand that

@vitaly-t
Copy link

vitaly-t commented Jun 10, 2017

So I suspect that the belgian Latin 1 names caused Mapquery some trouble.

At least as far as the database is concerned, the library does manual string concatenation for queries, which is a strict no-no. It should have the driver escape all the parameters.

I've added a PR: #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants