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

PostGIS layer #108

Open
brunj7 opened this issue Jun 9, 2014 · 0 comments
Open

PostGIS layer #108

brunj7 opened this issue Jun 9, 2014 · 0 comments

Comments

@brunj7
Copy link

brunj7 commented Jun 9, 2014

Hi,

First thanks for this awesome module. Second, I have a question regarding the implementation of PostGIS tables. When I try to replace what I was doing using shapefile with postGIS queries, I get an error message stating the SRIDs are not matching:

cur.execute('SELECT "%s" FROM %s WHERE %s' % ('", "'.join(fields), self.table, query))
psycopg2.InternalError: Operation on mixed SRID geometries

I am only using the US States table with SRID 4326 for this test. Here is my config:
"layers": {
"slayer":{"src": "postgis:dbname=postgres user= postgres password= host=localhost",
"table": "states",
"attributes": {
"id": "stusps"}
}
},

Do I need to set the projection or add a bbox when using postgis?

Thanks,

Julien

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

1 participant