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

Stephen Woodbridge woodbri at swoodbridge.com
Wed Mar 13 10:14:37 PDT 2013


The polygon is the bounding box of the image that you requested. 
Mapserver only needs the geometries the cross of the map image and this 
is what the where clause is doing.

Why do you thin this is not correct? What does the top of you mapfile 
look like and what does this LAYER definition look like?

-Steve W

On 3/13/2013 1:12 PM, Pedro Costa wrote:
> Thanks to all.
> The problem is the query.despite don't give me any error returns 0
> features...
> This happens because the 'where with the polygon'  [1]...
> Anybody knows the origin of that polygon?
>
>
> select encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex') as
> geom,"n_rua"
>      from ruas
>          where the_geom && GeomFromText('POLYGON((88071.2044330519
> 122184.53,88071.2044330519 124022.08,91531.2955669481
> 124022.08,91531.2955669481 122184.53,88071.2044330519 122184.53))',27492)
>
>
>
> Em 13-03-2013 16:54, Carlo Pelliconi escreveu:
>> I think like others that the problem could be in srid definition.
>>
>> Remember that you need to define an srid for the mapfile and an srid
>> for each layer in the mapfile.
>> When using postgis connectiontype I also put "using
>> srid=yourPostGisLayerSrid" in the DATA sql statement of the layer
>> (mandatory? I don't know, but it works)
>>
>> Hope this helps.
>> Best Regards, Carlo
>>
>> Il 13/03/2013 12:40, Pedro Costa ha scritto:
>>> 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