It could also be your extents:

- remove all layers from your mapfile, except for the PG one
- remove all projection blocks from your mapfile
- connect through ogrinfo commandline to that layer

ogrinfo PG:"host=127.0.0.1 user=postgres password=postgres dbname=test port=5432"

- use the ogrinfo command with the layername and the -summary switch to get the PG layer's extents

ogrinfo PG:"host=127.0.0.1 user=postgres password=postgres dbname=test port=5432" yourPGlayername -summary

- use that extent for the EXTENT parameter in your mapfile
- re-test with shp2img command

  shp2img -m postgis.map -o ttt.png -map_debug 3


-jeff



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






On 2015-01-07 12:40 PM, Lime, Steve D (MNIT) wrote:
If you get an image then at least no error is being generated. Are you
sure the layer you’re trying to view is on? There’s a switch in shp2img
to turn on a layer or you can set STATUS DEFAULT in the layer definition.

Steve

*From:*[email protected]
[mailto:[email protected]] *On Behalf Of
*[email protected]
*Sent:* Wednesday, January 07, 2015 10:27 AM
*To:* [email protected]; [email protected]
*Subject:* Re: [mapserver-users] map file with connection to postgis

Hello Jörg,

I get an empty picture when I create a png with the tool shp2img.

Thanks for helping!

*Gesendet:* Mittwoch, 07. Januar 2015 um 16:44 Uhr
*Von:* "Jörg Thomsen" <[email protected] <mailto:[email protected]>>
*An:* [email protected]
<mailto:[email protected]>
*Betreff:* Re: [mapserver-users] map file with connection to postgis

Hi,

Am 07.01.2015 um 16:33 schrieb [email protected]
<mailto:[email protected]>:
When I leave out "schema=public" in the string of "DATA" in my map file
then i get the following message:

ëPNG
→
IHDR♥Þ♥Þ☺♥wmFº♥PLTE ºz=┌☺tRNS @µÏf æIDATx£Ý┴1☺┬á§Om
?á
¥♠ý? ☺°1ù! IEND«B`é

looks like this is a png-image. Have you tried to open this file with an
image-viewer?

Jörg



_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to