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

Help for Postgis connexion #48

Open
moccand opened this issue Jul 29, 2021 · 0 comments
Open

Help for Postgis connexion #48

moccand opened this issue Jul 29, 2021 · 0 comments

Comments

@moccand
Copy link

moccand commented Jul 29, 2021

I face issue while configuring a POSTGIS Layer.

I tried many ways to set SQL for the Layer in the magnacarto "Layer Edit" form.
I set the Geometry Filed to "geom" but in the error I always get "geometry" :

Error: mapserv CGI did not return image (map[Content-Type:[application/vnd.ogc.se_xml; charset=UTF-8]])
msPostGISLayerWhichShapes(): Error (ERROR: syntax error at or near "select"
LINE 1: ...geometry"),'NDR') as geom,"city_id"::text FROM select geo...
^
) executing query: SELECT ST_AsBinary(("geometry"),'NDR') as geom,"city_id"::text FROM select geom, city_id from public.cities WHERE "geometry" && ST_GeomFromText('POLYGON((448811.428977486 6869927.25387933,448811.428977486 7091371.11930934,1098409.5757933 7091371.11930934,1098409.5757933 6869927.25387933,448811.428977486 6869927.25387933))',2154)

sql was : select geom, city_id from public.cities using srid=2154 using unique city_id

A classic mapfile works fine with :
DATA "geom from public.cities using srid=2154 using unique city_id"

trying : select geom, city_id from public.cities using unique city_id
gives :

Error: error while calling mapserv CGI (status 500)

my configuration :

  • Windows 10
  • Mapserver from MS4W
  • i don't use Mapnik
  • postgresql 9.1
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