[Mapserver-users] PHP/mapscript + PostGIS

Ruggero Valentinotti valruggero at libero.it
Fri Apr 2 14:44:30 EST 2004


This is a multi-part message in MIME format.

------=_NextPart_000_03A1_01C418F3.4BFA9750
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi list!
I need to use PostGIS for some vector layers joined to other tables in =
my database...
I'm using also several shapefile layers.
Everything works fine except for these two functions when I try to query =
the PostGIS vector layers:=20
drawQuery()
queryByShape()

I have built OID and GIST indexes on my tables.


Things improves if I use drawQuery() on a single layer (active layer),
but queryByShape() always fails.

I have found some messagges about these problems in the mapserver and =
postgis mailing lists,
but I can't find a solution or a workaround...

Could any of you help me?


I'm using:
Mapserver  4.0
postgis    0.8.1
postgresql 7.3.3


PS: sorry for my poor English ;)

=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0

       /\              Ruggero Valentinotti           =20
      //\\  /\         Studio Tecnico Forestale - Ambientale=20
     ///\\\//\\        Frazione Tozzaga  - Via alle Pozze, 2 =20
    ////\\\\/\\\       38022 CALDES (TN) - Italy            =20
   /////\\\\\\\\\                                           =20
       ||////\\\\\                                          =20
  _____||___||_____    E-mail: valruggero at libero.it
------=_NextPart_000_03A1_01C418F3.4BFA9750
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT face=3DCourier size=3D2>Hi list!</FONT></DIV>
<DIV><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA"><FONT=20
face=3DCourier size=3D2>I need to use PostGIS for some vector layers =
joined to other=20
tables in my database...</FONT></SPAN></DIV>
<DIV><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA"><FONT=20
face=3DCourier size=3D2>I'm using also several shapefile =
layers.</FONT></SPAN></DIV>
<DIV><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA"><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA"><FONT=20
face=3DCourier size=3D2>Everything works fine except for these two =
functions when I=20
try to query the PostGIS vector layers:&nbsp;</FONT></SPAN></SPAN></DIV>
<DIV><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA"><FONT=20
face=3DCourier size=3D2>drawQuery()</FONT></SPAN></DIV>
<DIV><FONT face=3DCourier size=3D2>queryByShape()</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>I have built OID and GIST indexes on =
my=20
tables.</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><FONT face=3DCourier>Things improves if I use <SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA">drawQuery()=20
on a single layer (active layer),</SPAN></FONT></FONT></DIV>
<DIV><FONT size=3D2><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA"><FONT=20
face=3DCourier size=3D2>but queryByShape() always =
fails.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: =
AR-SA"></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA"><FONT=20
face=3DCourier><FONT size=3D2>I have found some messagges about these =
problems in=20
the mapserver and postgis mailing =
lists</FONT>,</FONT></SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; =
mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: IT; =
mso-fareast-language: IT; mso-bidi-language: AR-SA"><FONT=20
face=3DCourier><FONT size=3D2>but I can't find a solution or a=20
workaround</FONT>...</FONT></SPAN></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>Could any of you help =
me?</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>I'm using:</FONT></DIV>
<DIV><FONT face=3DCourier><FONT size=3D2>Maps</FONT><FONT =
size=3D2>erver&nbsp;=20
4.0</FONT></FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>postgis&nbsp;&nbsp;&nbsp; =
0.8.1</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>postgresql 7.3.3</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>PS: sorry for my poor English =
;)</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV></DIV>
<DIV><FONT face=3DCourier=20
size=3D2>=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=
=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0=B0</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
/\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;=20
Ruggero=20
Valentinotti&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //\\&nbsp;=20
/\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Studio Tecnico =
Forestale -=20
Ambientale <BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
///\\\//\\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Frazione =
Tozzaga&nbsp; -=20
Via alle Pozze, 2&nbsp; <BR>&nbsp;&nbsp;&nbsp;=20
////\\\\/\\\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 38022 CALDES (TN) -=20
Italy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;=20
<BR>&nbsp;&nbsp;=20
/////\\\\\\\\\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
||////\\\\\&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
<BR>&nbsp; _____||___||_____&nbsp;&nbsp;&nbsp; E-mail: <A=20
href=3D"mailto:valruggero at libero.it">valruggero at libero.it</A></FONT></DIV=
></BODY></HTML>

------=_NextPart_000_03A1_01C418F3.4BFA9750--




More information about the mapserver-users mailing list