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

Stephen Woodbridge woodbri at swoodbridge.com
Wed Mar 13 09:39:09 PDT 2013


I should be able to get the SQL query that mapserver is sending to 
postgresql. I would copy and paste is into pgadmin sql window and try it 
there. Then you can play with the sql to see what is going on.

More than likely you have the wrong projection so something else 
similar. I use this in a lot of my mapfiles as do others so it is not a 
bug in the code. Also make sure you have not flipped long-lat to 
lat-long or something like that.

-Steve

On 3/13/2013 11:20 AM, Yves Jacolin (Free) wrote:
> Hum, are you sure about your projection or the bbox requested?
>
> MapServer send the request to Postgresql but get 0 record.
>
> Y.
> Le mercredi 13 mars 2013 14:50:01 Pedro Costa a écrit :
>> Ok, i got some information [1]....
>>
>> I can see that mapserver tried get the layers....But no errors, i think...
>>
>>
>> [1] http://pastebin.com/fmnBLWcw
>>
>> Em 13-03-2013 12:53, Yves Jacolin (Free) escreveu:
>>> Hello,
>>>
>>> Could you try to add:
>>> DEBUG 5
>>>
>>> in the LAYER object. You can find some useful information in the mapserver
>>> log and see the request sent by MapServer.
>>>
>>> Regards,
>>>
>>> Y.
>>>
>>> Le mercredi 13 mars 2013 12:26:31 Pedro Costa a écrit :
>>>> Hi,
>>>>
>>>> Yes, sure...
>>>> No, nothing about the table....
>>>>
>>>> Thanks
>>>>
>>>>
>>>> LAYER
>>>>
>>>>        NAME "ruas"
>>>>        STATUS DEFAULT
>>>>        TYPE LINE
>>>>        CONNECTIONTYPE postgis
>>>>        PROCESSING "CLOSE_CONNECTION=DEFER"
>>>>        CONNECTION "user=pedro password=****** dbname=norte host=localhost
>>>>
>>>> options='-c client_encoding=LATIN1'"
>>>>
>>>>        DATA "the_geom from ruas using unique n_rua using srid=27492"
>>>>
>>>>            TOLERANCE 3
>>>>
>>>>        TOLERANCEUNITS pixels
>>>>        TEMPLATE void
>>>>
>>>>            PROJECTION
>>>>
>>>>        "init=epsg:27492"
>>>>
>>>>       END
>>>>
>>>>        METADATA
>>>>        "DESCRIPTION" "Ruas"
>>>>        "RESULT_FIELDS" "n_rua"
>>>>        "RESULT_HEADERS" "ID"
>>>>
>>>>          "ows_title"      "Ruas"
>>>>
>>>>            END  # Metadata
>>>>            CLASS
>>>>
>>>>        Name 'ruas'
>>>>        COLOR 0 0 0
>>>>
>>>>            END  # Class
>>>>
>>>>      END
>>>>
>>>> Em 13-03-2013 12:21, Yves Jacolin (Free) escreveu:
>>>>> Hello,
>>>>>
>>>>> Could you post you layer object from your mapfile?
>>>>>
>>>>> Does the log says something about  your postgis table?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Y.
>>>>>
>>>>> Le mercredi 13 mars 2013 11:40:29 Pedro Costa a écrit :
>>>>>> 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?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>> SO: Ubuntu server
>>>>>> MapServer version 6.0.1
>>>>>> _______________________________________________
>>>>>> mapserver-users mailing list
>>>>>> mapserver-users at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



More information about the mapserver-users mailing list