[mapserver-users] postgis layers don't show up

Jeff McKenna jmckenna at gatewaygeomatics.com
Wed Mar 13 08:02:37 PDT 2013


On 2013-03-13 8:40 AM, Pedro Costa wrote:
> Hi guys,
> 
> I have one mapfile with conections to postgis layers and one raster.
> My problem is that the layers from postgis don't show up...If i make the
> request without the raster i got only white images...
> I have the debug level in 5 and I got no erros in all logs (including
> apache)...
> The permissions of the database are correct because I tried accessing
> with qgis and it worked fine. I'm also try specified the projection
> ("using srid = 27493") but without sucess...
> I'm also tried add one of the Iayers of db but from a shape and worked
> fine...
> Furthermore, very strange is that when I try to run mapfile with
> pmapper, I can search for attributes and zoom to the correct areas
> (despite can't see geometries) ...
> 
> Anybody have an idea?
> 

Here is what I do when this happens to me:

- copy mapfile into new name
- use new named mapfile for testing
- remove all layers
- execute ogrinfo to the Postgres DB
- use the extents returned from ogrinfo from one pg/postgis layer as the
EXTENT parameter in your mapfile
- remove all projection objects in mapfile
- add one layer to the mapfile, for that same ogrinfo/postgis layer
(with no projection object)
- test with shp2img utility

Hope that process helps.  Once that works you can start working forward
with more layers or debug as you go.

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/





More information about the mapserver-users mailing list