[Mapserver-users] Re: Mapserver-users digest, Vol 1 #134 - 27 msgs
Rajendra Gupta
rajendrag at delhi.tcs.co.in
Wed Apr 16 01:54:18 PDT 2003
Dear Users
We have recently downloaded Mapserver & MapLab software and configured
with IIS as well as Apache web server. We could successfully able to run
the demo application of MapServer in both the environments using the ESRI
shape file data. The application is able to do panning, zooming, querying,
layer control, etc. operations. Now as a part of second phase of the
project, we want to access the Oracle Spatial data from MapServer and
publish on browser. We made a trial but failed to achieve the objective. In
this regard, we have the following clarifications
(a) Does MapServer 3.6.3/4/5 support the Oracle Spatial Database?
(b) If the answer to above is "Yes" Could you elaborate the procedure for
setting up the configuration for the same.
(c) Has any body done coding to include this feature?
Any assistance in this regard in solving the above problem shall be highly
appreciated.
thanks and regards
Dr. Rajendra K Gupta
GIS Service Practice
Tata Consultancy Services
4th Floor, PTI Building
4 Parliament Street
New Delhi -110 001, INDIA
Phone : +91 11 23316980 (Dir)/23317915/23318402 Ext. 414
Fax :+91 11 23318947
mapserver-users-request at lists.g
is.umn.edu To: mapserver-users at lists.gis.umn.edu
Sent by: cc:
mapserver-users-admin at lists.gis Subject: Mapserver-users digest, Vol 1 #134 - 27 msgs
.umn.edu
04/15/2003 10:00 AM
Please respond to
mapserver-users
Send Mapserver-users mailing list submissions to
mapserver-users at lists.gis.umn.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
or, via email, send a message with subject or body 'help' to
mapserver-users-request at lists.gis.umn.edu
You can reach the person managing the list at
mapserver-users-admin at lists.gis.umn.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mapserver-users digest..."
Today's Topics:
1. masking (Aaron D. Hunt)
2. RE: masking (Norman Vine)
3. Annotation fails to appear (Dan Liu)
4. Re: masking (Aaron D. Hunt)
5. Re: masking (Randy James)
6. Raster Catalogs (Rosangela Silva)
7. mapserver postgis query error (explain verbose) (Leah Roderman)
8. Re: mapserver postgis query error (explain verbose) (David Blasby)
9. another bug of mapserver 3.7 (pond bear)
10. RE: can't install ...still (Timothy.Mackey at ga.gov.au)
11. Re: blank images from mapserv cgi, not php/mapscript, shp2img, etc.
(Jerritt Collord)
12. 3.7 nightly and python/mapscript errors (Jerritt Collord)
13. Re: 3.7 nightly and python/mapscript errors (Sean Gillies)
14. RE: can't install ...still (Ramadhani)
15. Java API for MapServer? (Emmanuel FOURNAUX)
16. Re: 3.7 nightly and python/mapscript errors (Jerritt Collord)
17. Re: can't install ...still (Vincent Schut)
18. Tile a map (Sven Jacobi)
19. mystake in doc?? (Alessandro Galasso)
20. png images is broken in mapserver itasca demo (Sreekanth S
Rameshaiah)
21. Re: Tile a map (Jan Hartmann)
22. LABELREQUIRES or REQUIRES (Shannon Scott)
23. [Fwd: [maplab-users] class and style changes in Mapscript 37] (Dave
McIlhagga)
24. Re: masking (Daniel Morissette)
25. Re: another bug of mapserver 3.7 (Daniel Morissette)
26. Re: 3.7 nightly and python/mapscript errors (Sean Gillies)
27. Re: masking (Aaron D. Hunt)
--__--__--
Message: 1
From: "Aaron D. Hunt" <hunt at zedxinc.com>
To: <mapserver-users at lists.gis.umn.edu>
Date: Mon, 14 Apr 2003 14:13:43 -0400
Subject: [Mapserver-users] masking
This is a multi-part message in MIME format.
------=_NextPart_000_0061_01C30290.0E99C310
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Is there anyway to make a mask in mapserver? I need to block out =
anything outside of a polygon.
Aaron D. Hunt
------=_NextPart_000_0061_01C30290.0E99C310
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.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Is there anyway to make a mask in =
mapserver? I need=20
to block out anything outside of a polygon.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Aaron D. =
Hunt<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_0061_01C30290.0E99C310--
--__--__--
Message: 2
Reply-To: <nhv at cape.com>
From: "Norman Vine" <nhv at cape.com>
To: <mapserver-users at lists.gis.umn.edu>
Subject: RE: [Mapserver-users] masking
Date: Mon, 14 Apr 2003 14:37:59 -0400
Aaron D. Hunt writes:
> Is there anyway to make a mask in mapserver?
> I need to block out anything outside of a polygon.
Not really sure what you are asking but you can draw
a *large" polygon in the desired background color as
the topmost layer with a 'tranparent' polygon cutout for
the area you want the map rendered in
Or you can use mapscript to modify the image
HTH
Norman
--__--__--
Message: 3
Date: Mon, 14 Apr 2003 13:48:51 -0500
From: "Dan Liu" <dan.liu at mnplan.state.mn.us>
To: "<"<mapserver-users at lists.gis.umn.edu>
Subject: [Mapserver-users] Annotation fails to appear
Hi all,
I have the annotation layer in PHP/mapscript but it does not show on the
map.
Anybody knows what is wrong?
...
$Layer = ms_newLayerObj($map);
$Layer -> set("name","city_name");
$Layer -> set("status", MS_ON);
$Layer -> set("type", MS_LAYER_ANNOTATION);
$Layer -> set("data","mcd90py2");
$Layer -> set("classitem", "CITY_NAME");
$Layer -> set("labelitem", "CITY_NAME");
$Layer -> {annotate} = 1;
$LabelClass = ms_newClassObj($Layer);
$LabelClass -> {color} = $Color1;
$LabelClass -> {label} -> {size} = MS_GIANT;
$LabelClass -> {label} -> {type} = MS_TRUETYPE;
$LabelClass -> {label} -> {position} = MS_CC;
$LabelClass -> {label} -> {color} = $map->addColor(0,0,0);
$LabelClass -> {label} -> {outlinecolor} = $map->addColor(199,216,252);
...
Dan Liu
MN Land Management Information Center
658 Cedar Street
Saint Paul, MN 55155
(651) 483-2324 [phone]
(651) 296-1212 [fax]
dan.liu at state.mn.us
On April 23 the Land Management Information Center will be transferred from
Minnesota Planning to the Minnesota Department of Administration. LMIC
will continue to be located in our current location and offer the same
quality GIS services that our clients have learned to expect.
--__--__--
Message: 4
From: "Aaron D. Hunt" <hunt at zedxinc.com>
To: <mapserver-users at lists.gis.umn.edu>, <nhv at cape.com>
Subject: Re: [Mapserver-users] masking
Date: Mon, 14 Apr 2003 15:26:46 -0400
I have a national raster weather map. I want to make state maps( using a
state shape file) with the rest of the us blocked out. Is there a way to
tell mapserver to show data only on the one polygon and nothing else?
----- Original Message -----
From: "Norman Vine" <nhv at cape.com>
To: <mapserver-users at lists.gis.umn.edu>
Sent: Monday, April 14, 2003 2:37 PM
Subject: RE: [Mapserver-users] masking
> Aaron D. Hunt writes:
>
> > Is there anyway to make a mask in mapserver?
> > I need to block out anything outside of a polygon.
>
> Not really sure what you are asking but you can draw
> a *large" polygon in the desired background color as
> the topmost layer with a 'tranparent' polygon cutout for
> the area you want the map rendered in
>
> Or you can use mapscript to modify the image
>
> HTH
>
> Norman
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--__--__--
Message: 5
Date: Mon, 14 Apr 2003 12:51:30 -0700 (PDT)
From: Randy James <rjames57 at yahoo.com>
Subject: Re: [Mapserver-users] masking
To: "Aaron D. Hunt" <hunt at zedxinc.com>
Cc: mapserver-users at lists.gis.umn.edu
Hi
If you have your querymap setup you can query the polygon
and have the query as selected.
# 2 querymap selected
querymap
color 255 255 168
size 740 740
status on
style selected
end
Cheers
--- "Aaron D. Hunt" <hunt at zedxinc.com> wrote:
> I have a national raster weather map. I want to make
> state maps( using a
> state shape file) with the rest of the us blocked out. Is
> there a way to
> tell mapserver to show data only on the one polygon and
> nothing else?
>
> ----- Original Message -----
> From: "Norman Vine" <nhv at cape.com>
> To: <mapserver-users at lists.gis.umn.edu>
> Sent: Monday, April 14, 2003 2:37 PM
> Subject: RE: [Mapserver-users] masking
>
>
> > Aaron D. Hunt writes:
> >
> > > Is there anyway to make a mask in mapserver?
> > > I need to block out anything outside of a polygon.
> >
> > Not really sure what you are asking but you can draw
> > a *large" polygon in the desired background color as
> > the topmost layer with a 'tranparent' polygon cutout
> for
> > the area you want the map rendered in
> >
> > Or you can use mapscript to modify the image
> >
> > HTH
> >
> > Norman
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> >
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
--__--__--
Message: 6
From: "Rosangela Silva" <rosangela.silva at zenitpolar.com.br>
To: <mapserver-users at lists.gis.umn.edu>
Date: Mon, 14 Apr 2003 17:22:25 -0300
Subject: [Mapserver-users] Raster Catalogs
This is a multi-part message in MIME format.
------=_NextPart_000_0005_01C302AA.6AA5EA20
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
Do you know if is possible to work with raster catalogs=20
in MapServer? How??
Thanks
Rosangela.
------=_NextPart_000_0005_01C302AA.6AA5EA20
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.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Do you know if is possible to work with =
<FONT=20
face=3D"Times New Roman"><FONT face=3DArial>raster catalogs</FONT>=20
</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>in MapServer? How??</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Rosangela.</FONT></DIV></BODY></HTML>
------=_NextPart_000_0005_01C302AA.6AA5EA20--
--__--__--
Message: 7
Date: Mon, 14 Apr 2003 13:38:36 -0700
From: Leah Roderman <elrod at oaktownunderground.com>
To: mapserver-users at lists.gis.umn.edu,
postgis-users at postgis.refractions.net
Subject: [Mapserver-users] mapserver postgis query error (explain verbose)
I'm just checking to see if there's a fix for the Mapserver query of a
PostGIS layer that produces the "explain verbose" error included below. I
see PostGIS 0.7.5 was released last week -- there was some discussion
around this error earlier this month, but not sure whether this problem got
addressed in the new release.
My alternative solution was going to be pgsql2shp, so I'd also be
interested in anyone's success or frustrations with similar attempts.
thanks much, as always!
Content-type: text/html msPOSTGISLayerGetShape(): Query error. Error
executing POSTGIS SQL statement (in FETCH ALL): EXPLAIN VERBOSE SELECT *
FROM plant_coords - Error with POSTGIS data variable. You specified ''.
Standard ways of specifiying are :
(1) 'geometry_column from geometry_table'
(2) 'geometry_column from (<sub query>) as foo using unique <column name>
using SRID=<srid#>'
Make sure you put in the 'using unique <column name>' and 'using SRID=#'
clauses in.
For more help, please see http://postgis.refractions.net/documentation.php
Mappostgis.c - version of Nov 15/2002.
---
My config: Mapserver 3.6.4, PostGIS 0.7.4, PostgreSQL 7.3.2, Apache 2.0.44
(virtual domain), Linux RH8.0
--__--__--
Message: 8
Date: Mon, 14 Apr 2003 13:55:57 -0700
From: David Blasby <dblasby at refractions.net>
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Re: mapserver postgis query error (explain
verbose)
This is a multi-part message in MIME format.
--------------010709050900000403030207
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Leah Roderman wrote:
>I'm just checking to see if there's a fix for the Mapserver query of a
PostGIS layer that produces the "explain verbose" error included below. I
see PostGIS 0.7.5 was released last week -- there was some discussion
around this error earlier this month, but not sure whether this problem got
addressed in the new release.
>
>My alternative solution was going to be pgsql2shp, so I'd also be
interested in anyone's success or frustrations with similar attempts.
Yes there is a fix. I sent it out to a few people last week and they
have indicated it works fine and hasnt caused any new problems.
It does leak about 1.5kb of memory/layer at the moment - this should not
be a problem for you. When I fix that I'll commit it to v3.6 CVS.
Until then, mappostgis.c is attached.
dave
ps. The 3.6 and 3.7 mappostgis.c used to be exactly the same. This is,
unfortunately, no longer the case - someone changed some of the map.h
fields and that required changes in "mappostgis.c". If you are using a
very modern mapserver, this mappostgis.c will not work. You'll know
right away at compile time if there's a problem.
It'll be a little bit before I merge in the 3.7 changes and commit it.
--------------010709050900000403030207
Content-Type: text/plain;
name="mappostgis.c"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="mappostgis.c"
#include "map.h"
#ifndef FLT_MAX
#define FLT_MAX 25000000.0
#endif
#ifdef USE_POSTGIS
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN 1
#endif
#ifndef BIG_ENDIAN
#define BIG_ENDIAN 2
#endif
#include "libpq-fe.h"
#include <string.h>
typedef struct ms_POSTGIS_layer_info_t
{
char *sql; //sql query to send to DB
PGconn *conn; //connection to db
long row_num; //what row is the NEXT to be read (for random
access)
PGresult *query_result;//for fetching rows from the db
char *urid_name; // name of user-specified unique identifier or
OID
char *user_srid; //zero length = calculate, non-zero means using
this value!
} msPOSTGISLayerInfo;
char tolower(char c)
{
if ((c <'A') || (c>'Z'))
return c;
return c-'A'+'a';
}
//remove white space
//dont send in empty strings or strings with just " " in them!
char* removeWhite(char *str)
{
int initial;
char *orig,*loc;
initial = strspn(str, " ");
if (initial != 0)
{
memmove(str, str+ initial, strlen(str) - initial+1);
}
//now final
if (strlen(str) == 0)
return str;
if (str[ strlen(str)-1] == ' ')
{
//have to remove from end
orig = str;
loc = &str[ strlen(str)-1];
while (( *loc = ' ') && (loc >orig) )
{
*loc = 0;
loc--;
}
}
return str;
}
char *strstrIgnoreCase(char *haystack, char *needle)
{
char *hay_lower;
char *needle_lower;
int len_hay,len_need;
int t;
char *loc;
len_hay = strlen(haystack);
len_need= strlen(needle);
hay_lower = (char *) malloc (len_hay +1);
needle_lower=(char*) malloc (len_need+1);
for(t=0;t<len_hay;t++)
{
hay_lower[t] = tolower(haystack[t]);
}
hay_lower[t] = 0;
for(t=0;t<len_need;t++)
{
needle_lower[t] = tolower(needle[t]);
}
needle_lower[t] =0;
loc = strstr(hay_lower,needle_lower);
free(hay_lower);
free(needle_lower);
if (loc == NULL)
{
return NULL;
}
return haystack + (loc-hay_lower);
}
//void postresql_NOTICE_HANDLER(void *arg, const char *message);
char *DATAERRORMESSAGE(char *dString, char *preamble)
{
char *m;
char tmp[7000];
m = (char*) malloc(10000);
sprintf(m,"%s",preamble);
sprintf(tmp,"Error with POSTGIS data variable. You specified
'%s'.<br>\n", dString);
strcat(m,tmp);
sprintf(tmp,"Standard ways of specifiying are : <br>\n(1)
'geometry_column from geometry_table' <br>\n(2) 'geometry_column from
(<sub query>) as foo using unique <column name> using SRID
=<srid#>' <br><br>\n\n");
strcat(m,tmp);
sprintf(tmp,"Make sure you put in the 'using unique <column
name>' and 'using SRID=#' clauses in.\n\n<br><br>");
strcat(m,tmp);
sprintf(tmp,"For more help, please see
http://postgis.refractions.net/documentation.php \n\n<br><br>");
strcat(m,tmp);
sprintf(tmp,"Mappostgis.c - version of April 14/2003.\n");
strcat(m,tmp);
//printf("%s",m);
//printf("size = %i\n",strlen(m));
return m;
}
int msPOSTGISLayerParseData(char *data, char *geom_column_name,
char *table_name, char *urid_name,char
*user_srid);
static int gBYTE_ORDER = 0;
//open up a connection to the postgresql database using the connection
string in layer->connection
// ie. "host=192.168.50.3 user=postgres port=5555 dbname=mapserv"
int msPOSTGISLayerOpen(layerObj *layer)
{
msPOSTGISLayerInfo *layerinfo;
int order_test = 1;
//fprintf(stderr,"msPOSTGISLayerOpen called\n");
if (layer->postgislayerinfo)
return MS_SUCCESS; //already open
if( layer->data == NULL )
{
msSetError(MS_QUERYERR,
DATAERRORMESSAGE("","Error parsing POSTGIS data
variable: nothing specified in DATA statement.<br><br>\n\nMore
Help:<br><br>\n\n"),
"msPOSTGISLayerOpen()");
return(MS_FAILURE);
}
//have to setup a connection to the database
layerinfo = (msPOSTGISLayerInfo *) malloc( sizeof(msPOSTGISLayerInfo)
);
layerinfo->sql = NULL; //calc later
layerinfo->row_num=0;
layerinfo->query_result= NULL;
layerinfo->conn = PQconnectdb( layer->connection );
if (PQstatus(layerinfo->conn) == CONNECTION_BAD)
{
msSetError(MS_QUERYERR, "couldnt make connection to DB with connect
string '%s'.\n<br>\nError reported was '%s'.\n<br>\n\nThis error occured
when trying to make a connection to the specified postgresql server.
\n<br>\nMost commonly this is caused by <br>\n(1) incorrect connection
string <br>\n(2) you didnt specify a 'user=...' in your connection string
<br>\n(3) the postmaster (postgresql server) isnt running <br>\n(4) you are
not allowing TCP/IP connection to the postmaster <br>\n(5) your postmaster
is not running on the correct port - if its not on 5432 you must specify a
'port=...' <br>\n (6) the security on your system does not allow the
webserver (usually user 'nobody') to make socket connections to the
postmaster <br>\n(7) you forgot to specify a 'host=...' if the postmaster
is on a different machine<br>\n(8) you made a typo <br>\n ",
"msPOSTGISLayerOpen()",
layer->connection,PQerrorMessage(layerinfo->conn) );
free(layerinfo);
return(MS_FAILURE);
}
// PQsetNoticeProcessor(layerinfo->conn, postresql_NOTICE_HANDLER ,(void
*) layerinfo);
layer->postgislayerinfo = (void *) layerinfo;
if( ((char *) &order_test)[0] == 1 )
gBYTE_ORDER = LITTLE_ENDIAN;
else
gBYTE_ORDER = BIG_ENDIAN;
return MS_SUCCESS;
}
// Free the itemindexes array in a layer.
void msPOSTGISLayerFreeItemInfo(layerObj *layer)
{
//fprintf(stderr,"msPOSTGISLayerFreeItemInfo called\n");
if (layer->iteminfo)
free(layer->iteminfo);
layer->iteminfo = NULL;
}
//allocate the iteminfo index array - same order as the item list
int msPOSTGISLayerInitItemInfo(layerObj *layer)
{
int i;
int *itemindexes ;
//fprintf(stderr,"msPOSTGISLayerInitItemInfo called\n");
if (layer->numitems == 0)
return MS_SUCCESS;
if (layer->iteminfo)
free(layer->iteminfo);
if((layer->iteminfo = (int *)malloc(sizeof(int)*layer->numitems))==
NULL)
{
msSetError(MS_MEMERR, NULL, "msPOSTGISLayerInitItemInfo()");
return(MS_FAILURE);
}
itemindexes = (int*)layer->iteminfo;
for(i=0;i<layer->numitems;i++)
{
itemindexes[i] = i; //last one is always the geometry one - the
rest are non-geom
}
return(MS_SUCCESS);
}
//Since we now have PostGIST 0.5, and 0.6 calling conventions,
// we have to attempt to handle the database in several ways. If we do the
wrong
// thing, then it'll throw an error and we can rollback and try again.
//
// 2. attempt to do 0.6 calling convention (spatial ref system needed)
// 3. attempt to do 0.5 calling convention (no spatial ref system)
// The difference between 0.5 and 0.6 is that the bounding box must be
// declared to be in the same the same spatial reference system as the
// geometry column. For 0.6, we determine the SRID of the column and then
// tag the bounding box as the same SRID.
int prep_DB(char *geom_table,char *geom_column,layerObj *layer,
PGresult **sql_results,rectObj rect,char *query_string, char *urid_name,
char *user_srid)
{
PGresult *result;
char columns_wanted[5000];
char temp[5000];
char tmp[5000];
char tmp2[5000];
char query_string_0_6[6000];
int t;
char box3d[200];
msPOSTGISLayerInfo *layerinfo;
char *pos_from, *pos_ftab, *pos_space, *pos_paren;
char f_table_name[5000];
layerinfo = (msPOSTGISLayerInfo *) layer->postgislayerinfo;
/* Set the urid name */
layerinfo->urid_name = urid_name;
/* Extract the proper f_table_name from the geom_table string.
* We are expecting the geom_table to be either a single word
* or a sub-select clause that possibly includes a join --
*
* (select column[,column[,...]] from ftab[ natural join table2]) as
foo
*
* We are expecting whitespace or a ')' after the ftab name.
*
*/
pos_from = strstr(geom_table, " from ");
if (pos_from ==NULL)
pos_from = strstr(geom_table, " FROM "); //try uppercase
if (pos_from == NULL) {
strcpy(f_table_name, geom_table);
}
else { // geom_table is a sub-select clause
pos_ftab = pos_from + 6; // This should be the start of the ftab
name
pos_space = strstr(pos_ftab, " "); // First space
//pos_paren = strstr(pos_ftab, ")"); // Closing paren of clause
pos_paren = rindex(pos_ftab,')');
if ( (pos_space ==NULL) || (pos_paren ==NULL) ) {
msSetError(MS_QUERYERR,
DATAERRORMESSAGE(geom_table,"Error
parsing POSTGIS data variable: Something is wrong with your subselect
statement.<br><br>\n\nMore Help:<br><br>\n\n"),
"prep_DB()");
return(MS_FAILURE);
}
if (pos_paren < pos_space) { // closing parenthesis preceeds any
space
strncpy(f_table_name, pos_ftab, pos_paren - pos_ftab);
}
else {
strncpy(f_table_name, pos_ftab, pos_space - pos_ftab);
}
}
if (layer->numitems ==0)
{
if (gBYTE_ORDER == LITTLE_ENDIAN)
sprintf(columns_wanted,"asbinary(force_collection(force_2d
(%s)),'NDR'),%s::text", geom_column, urid_name);
else
sprintf(columns_wanted,"asbinary(force_collection(force_2d
(%s)),'XDR'),%s::text", geom_column, urid_name);
}
else
{
columns_wanted[0] = 0; //len=0
for (t=0;t<layer->numitems; t++)
{
sprintf(temp,"%s::text,",layer->items[t]);
strcat(columns_wanted,temp);
}
if (gBYTE_ORDER == LITTLE_ENDIAN)
sprintf(temp,"asbinary(force_collection(force_2d
(%s)),'NDR'),%s::text", geom_column, urid_name);
else
sprintf(temp,"asbinary(force_collection(force_2d
(%s)),'XDR'),%s::text", geom_column, urid_name);
strcat(columns_wanted,temp);
}
sprintf(box3d,"'BOX3D(%.15g %.15g,%.15g %.15g)'::BOX3D",rect.minx,
rect.miny, rect.maxx, rect.maxy);
// substitute token '!BOX!' in geom_table with the box3d - do at most
1 substitution
if (strstr(geom_table,"!BOX!"))
{
// need to do a substition
char *start, *end;
char *result;
result = malloc(7000);
start = strstr(geom_table,"!BOX!");
end = start+5;
start[0] =0;
result[0]=0;
strcat(result,geom_table);
strcat(result,box3d);
strcat(result,end);
geom_table= result;
}
if (layer->filter.string == NULL)
{
if (strlen(user_srid) == 0)
{
sprintf(query_string_0_6,"DECLARE mycursor BINARY CURSOR FOR
SELECT %s from %s WHERE %s && setSRID(%s, find_srid('','%s','%s') )",
columns_wanted,geom_table,geom_column,box3d,removeWhite(f_table_name),removeWhite(geom_column));
}
else //use the user specified version
{
sprintf(query_string_0_6,"DECLARE mycursor BINARY CURSOR FOR
SELECT %s from %s WHERE %s && setSRID(%s, %s )",
columns_wanted,geom_table,geom_column,box3d,user_srid);
}
}
else
{
if (strlen(user_srid) == 0)
{
sprintf(query_string_0_6,"DECLARE mycursor BINARY CURSOR FOR
SELECT %s from %s WHERE (%s) and (%s && setSRID( %s,find_srid('','%s','%s')
))",
columns_wanted,geom_table,layer->filter.string,geom_column,box3d,removeWhite(f_table_name),removeWhite(geom_column));
}
else
{
sprintf(query_string_0_6,"DECLARE mycursor BINARY CURSOR FOR
SELECT %s from %s WHERE (%s) and (%s && setSRID( %s,%s) )",
columns_wanted,geom_table,layer->filter.string,geom_column,box3d,user_srid);
}
}
//start transaction required by cursor
result = PQexec(layerinfo->conn, "BEGIN");
if (!(result) || PQresultStatus(result) != PGRES_COMMAND_OK)
{
msSetError(MS_QUERYERR, "Error executing POSTGIS BEGIN
statement.",
"msPOSTGISLayerWhichShapes()");
PQclear(result);
layerinfo->query_result = NULL;
return(MS_FAILURE); // totally screwed
}
PQclear(result);
//set enable_seqscan=off not required (already done)
//fprintf (stderr,"query_string_0_6:%s\n",query_string_0_6);
result = PQexec(layerinfo->conn, query_string_0_6 );
if ( (result!=NULL) && (PQresultStatus(result) == PGRES_COMMAND_OK) )
{
//PQclear(result);
*sql_results = result;
strcpy(query_string, query_string_0_6 );
return (MS_SUCCESS);
}
//okay, that command didnt work. Its probably a 0.5 database
// We have to everything again, after performing a rollback.
PQclear(result);
result = PQexec(layerinfo->conn, "rollback" );
PQclear(result);
result = PQexec(layerinfo->conn, "begin" );
if (!(result) || PQresultStatus(result) != PGRES_COMMAND_OK)
{
msSetError(MS_QUERYERR, "Couldnt recover from a bad query:
\n'%s'\n",
"prep_DB()",query_string_0_6);
PQclear(result);
layerinfo->query_result = NULL;
return(MS_FAILURE); // totally screwed
}
PQclear(result);
//fprintf (stderr,"prep_DB:query_string_0_5:%s\n",query_string_0_5);
sprintf(tmp2, "Error executing POSTGIS DECLARE (the actual
query) statement: '%s' <br><br>\n\nPostgresql reports the error
'%s'<br><br>\n\nMore Help:<br><br>\n\n",
query_string_0_6,
PQerrorMessage(layerinfo->conn)
);
sprintf(tmp, "%s%s",
tmp2,
DATAERRORMESSAGE("<check your .map file>"
,"")
);
msSetError(MS_QUERYERR,tmp,"prep_DB()");
PQclear(result);
layerinfo->query_result = NULL;
return(MS_FAILURE); // totally screwed
}
// build the neccessary SQL
// allocate a cursor for the SQL query
// get ready to read from the cursor
//
// For queries, we need to also retreive the OID for each of the rows
// So GetShape() can randomly access a row.
int msPOSTGISLayerWhichShapes(layerObj *layer, rectObj rect)
{
char *query_str;
char *table_name;
char *geom_column_name;
char *urid_name;
char *user_srid;
msPOSTGISLayerInfo *layerinfo;
int set_up_result;
table_name = malloc(500);
geom_column_name = malloc(500);
urid_name = malloc(500);
user_srid = malloc(500);
//fprintf(stderr,"msPOSTGISLayerWhichShapes called\n");
layerinfo = (msPOSTGISLayerInfo *) layer->postgislayerinfo;
if (layerinfo == NULL)
{
//layer not opened yet
msSetError(MS_QUERYERR, "msPOSTGISLayerWhichShapes called on
unopened layer (layerinfo = NULL)",
"msPOSTGISLayerWhichShapes()");
return(MS_FAILURE);
}
if( layer->data == NULL )
{
msSetError(MS_QUERYERR,
"Missing DATA clause in PostGIS Layer definition.
DATA statement must contain 'geometry_column from table_name' or
'geometry_column from (sub-query) as foo'.",
"msPOSTGISLayerWhichShapes()");
return(MS_FAILURE);
}
query_str = (char *) malloc(6000); //should be big enough
memset(query_str,0,6000); //zero it out
msPOSTGISLayerParseData(layer->data, geom_column_name, table_name,
urid_name,user_srid);
set_up_result= prep_DB(table_name,geom_column_name, layer,
&(layerinfo->query_result), rect,query_str, urid_name,user_srid);
if (set_up_result != MS_SUCCESS)
return set_up_result; //relay error
layerinfo->sql = query_str;
layerinfo->query_result = PQexec(layerinfo->conn, "FETCH ALL in
mycursor");
if (!(layerinfo->query_result) ||
PQresultStatus(layerinfo->query_result) != PGRES_TUPLES_OK)
{
char tmp[4000];
sprintf(tmp, "Error executing POSTGIS SQL statement (in FETCH
ALL): %s\n-%s\n", query_str,PQerrorMessage(layerinfo->conn) );
msSetError(MS_QUERYERR,
DATAERRORMESSAGE("",tmp),
"msPOSTGISLayerWhichShapes()");
PQclear(layerinfo->query_result);
layerinfo->query_result = NULL;
return(MS_FAILURE);
}
layerinfo->row_num =0;
return(MS_SUCCESS);
}
// Close the postgis record set and connection
int msPOSTGISLayerClose(layerObj *layer)
{
msPOSTGISLayerInfo *layerinfo;
//fprintf(stderr,"msPOSTGISLayerClose called\n");
layerinfo = (msPOSTGISLayerInfo *) layer->postgislayerinfo;
if (layerinfo != NULL)
{
PQclear(layerinfo->query_result);
layerinfo->query_result = NULL;
PQfinish(layerinfo->conn);
layerinfo->conn = NULL;
free(layerinfo);
layer->postgislayerinfo = NULL;
}
return(MS_SUCCESS);
}
//*******************************************************
// wkb is assumed to be 2d (force_2d)
// and wkb is a GEOMETRYCOLLECTION (force_collection)
// and wkb is in the endian of this computer (asbinary(...,'[XN]DR'))
// each of the sub-geom inside the collection are point,linestring, or
polygon
//
// also, int is 32bits long
// double is 64bits long
//*******************************************************
// convert the wkb into points
// points -> pass through
// lines-> constituent points
// polys-> treat ring like line and pull out the consituent points
int force_to_points(char *wkb, shapeObj *shape)
{
//we're going to make a 'line' for each entity (point, line or ring)
in the geom collection
int offset =0,pt_offset;
int ngeoms ;
int t,u,v;
int type,nrings,npoints;
lineObj line={0,NULL};
shape->type = MS_SHAPE_NULL; //nothing in it
memcpy( &ngeoms, &wkb[5], 4);
offset = 9; //were the first geometry is
for (t=0; t<ngeoms; t++)
{
memcpy( &type, &wkb[offset+1], 4); // type of this geometry
if (type ==1) //POINT
{
shape->type = MS_SHAPE_POINT;
line.numpoints = 1;
line.point = (pointObj *) malloc (sizeof(pointObj));
memcpy( &line.point[0].x , &wkb[offset+5 ], 8);
memcpy( &line.point[0].y , &wkb[offset+5+8], 8);
offset += 5+16;
msAddLine(shape,&line);
free(line.point);
}
if (type == 2) //linestring
{
shape->type = MS_SHAPE_POINT;
memcpy(&line.numpoints, &wkb[offset+5],4); //num points
line.point = (pointObj *) malloc (sizeof(pointObj)*
line.numpoints ); //point struct
for(u=0;u<line.numpoints ; u++)
{
memcpy( &line.point[u].x , &wkb[offset+9 + (16 * u)],
8);
memcpy( &line.point[u].y , &wkb[offset+9 + (16 * u)+8],
8);
}
offset += 9 +(16)*line.numpoints; //length of object
msAddLine(shape,&line);
free(line.point);
}
if (type == 3) //polygon
{
shape->type = MS_SHAPE_POINT;
memcpy(&nrings, &wkb[offset+5],4); //num rings
//add a line for each polygon ring
pt_offset = 0;
offset += 9; //now points at 1st linear ring
for (u=0;u<nrings;u++) //for each ring, make a line
{
memcpy(&npoints, &wkb[offset],4); //num points
line.numpoints = npoints;
line.point = (pointObj *) malloc (sizeof(pointObj)*
npoints); //point struct
for(v=0;v<npoints;v++)
{
memcpy( &line.point[v].x , &wkb[offset+4 + (16 *
v)], 8);
memcpy( &line.point[v].y , &wkb[offset+4 + (16 *
v)+8], 8);
}
//make offset point to next linear ring
msAddLine(shape,&line);
free(line.point);
offset += 4+ (16)*npoints;
}
}
}
return(MS_SUCCESS);
}
//convert the wkb into lines
// points-> remove
// lines -> pass through
// polys -> treat rings as lines
int force_to_lines(char *wkb, shapeObj *shape)
{
int offset =0,pt_offset;
int ngeoms ;
int t,u,v;
int type,nrings,npoints;
lineObj line={0,NULL};
shape->type = MS_SHAPE_NULL; //nothing in it
memcpy( &ngeoms, &wkb[5], 4);
offset = 9; //were the first geometry is
for (t=0; t<ngeoms; t++)
{
memcpy( &type, &wkb[offset+1], 4); // type of this geometry
//cannot do anything with a point
if (type == 2) //linestring
{
shape->type = MS_SHAPE_LINE;
memcpy(&line.numpoints, &wkb[offset+5],4); //num points
line.point = (pointObj *) malloc (sizeof(pointObj)*
line.numpoints ); //point struct
for(u=0;u<line.numpoints ; u++)
{
memcpy( &line.point[u].x , &wkb[offset+9 + (16 * u)],
8);
memcpy( &line.point[u].y , &wkb[offset+9 + (16 * u)+8],
8);
}
offset += 9 +(16)*line.numpoints; //length of object
msAddLine(shape,&line);
free(line.point);
}
if (type == 3) //polygon
{
shape->type = MS_SHAPE_LINE;
memcpy(&nrings, &wkb[offset+5],4); //num rings
//add a line for each polygon ring
pt_offset = 0;
offset += 9; //now points at 1st linear ring
for (u=0;u<nrings;u++) //for each ring, make a line
{
memcpy(&npoints, &wkb[offset],4); //num points
line.numpoints = npoints;
line.point = (pointObj *) malloc (sizeof(pointObj)*
npoints); //point struct
for(v=0;v<npoints;v++)
{
memcpy( &line.point[v].x , &wkb[offset+4 + (16 *
v)], 8);
memcpy( &line.point[v].y , &wkb[offset+4 + (16 *
v)+8], 8);
}
//make offset point to next linear ring
msAddLine(shape,&line);
free(line.point);
offset += 4+ (16)*npoints;
}
}
}
return(MS_SUCCESS);
}
// point -> reject
// line -> reject
// polygon -> lines of linear rings
int force_to_polygons(char *wkb, shapeObj *shape)
{
int offset =0,pt_offset;
int ngeoms ;
int t,u,v;
int type,nrings,npoints;
lineObj line={0,NULL};
shape->type = MS_SHAPE_NULL; //nothing in it
memcpy( &ngeoms, &wkb[5], 4);
offset = 9; //were the first geometry is
for (t=0; t<ngeoms; t++)
{
memcpy( &type, &wkb[offset+1], 4); // type of this geometry
if (type == 3) //polygon
{
shape->type = MS_SHAPE_POLYGON;
memcpy(&nrings, &wkb[offset+5],4); //num rings
//add a line for each polygon ring
pt_offset = 0;
offset += 9; //now points at 1st linear ring
for (u=0;u<nrings;u++) //for each ring, make a line
{
memcpy(&npoints, &wkb[offset],4); //num points
line.numpoints = npoints;
line.point = (pointObj *) malloc (sizeof(pointObj)*
npoints); //point struct
for(v=0;v<npoints;v++)
{
memcpy( &line.point[v].x , &wkb[offset+4 + (16 *
v)], 8);
memcpy( &line.point[v].y , &wkb[offset+4 + (16 *
v)+8], 8);
}
//make offset point to next linear ring
msAddLine(shape,&line);
free(line.point);
offset += 4+ (16)*npoints;
}
}
}
return(MS_SUCCESS);
}
// if there is any polygon in wkb, return force_polygon
// if there is any line in wkb, return force_line
// otherwise return force_point
int dont_force(char *wkb, shapeObj *shape)
{
int offset =0;
int ngeoms ;
int type,t;
int best_type;
//printf("dont force");
best_type = MS_SHAPE_NULL; //nothing in it
memcpy( &ngeoms, &wkb[5], 4);
offset = 9; //were the first geometry is
for (t=0; t<ngeoms; t++)
{
memcpy( &type, &wkb[offset+1], 4); // type of this geometry
if (type == 3) //polygon
{
best_type = MS_SHAPE_POLYGON;
}
if ( (type ==2) && ( best_type != MS_SHAPE_POLYGON) )
{
best_type = MS_SHAPE_LINE;
}
if ( (type==1) && (best_type == MS_SHAPE_NULL) )
{
best_type = MS_SHAPE_POINT;
}
}
if (best_type == MS_SHAPE_POINT)
{
return force_to_points(wkb,shape);
}
if (best_type == MS_SHAPE_LINE)
{
return force_to_lines(wkb,shape);
}
if (best_type == MS_SHAPE_POLYGON)
{
return force_to_polygons(wkb,shape);
}
return(MS_FAILURE); //unknown type
}
//find the bounds of the shape
void find_bounds(shapeObj *shape)
{
int t,u;
int first_one = 1;
for (t=0; t< shape->numlines; t++)
{
for(u=0;u<shape->line[t].numpoints; u++)
{
if (first_one)
{
shape->bounds.minx = shape->line[t].point[u].x;
shape->bounds.maxx = shape->line[t].point[u].x;
shape->bounds.miny = shape->line[t].point[u].y;
shape->bounds.maxy = shape->line[t].point[u].y;
first_one = 0;
}
else
{
if (shape->line[t].point[u].x < shape->bounds.minx)
shape->bounds.minx = shape->line[t].point[u].x;
if (shape->line[t].point[u].x > shape->bounds.maxx)
shape->bounds.maxx = shape->line[t].point[u].x;
if (shape->line[t].point[u].y < shape->bounds.miny)
shape->bounds.miny = shape->line[t].point[u].y;
if (shape->line[t].point[u].y > shape->bounds.maxy)
shape->bounds.maxy = shape->line[t].point[u].y;
}
}
}
}
//find the next shape with the appropriate shape type (convert it if
necessary)
// also, load in the attribute data
//MS_DONE => no more data
int msPOSTGISLayerNextShape(layerObj *layer, shapeObj *shape)
{
int result;
msPOSTGISLayerInfo *layerinfo;
layerinfo = (msPOSTGISLayerInfo *) layer->postgislayerinfo;
//fprintf(stderr,"msPOSTGISLayerNextShape called\n");
if (layerinfo == NULL)
{
msSetError(MS_QUERYERR, "NextShape called with layerinfo = NULL",
"msPOSTGISLayerNextShape()");
return(MS_FAILURE);
}
result= msPOSTGISLayerGetShapeRandom(layer, shape,
&(layerinfo->row_num) );
// getshaperandom will increment the row_num
//layerinfo->row_num ++;
return result;
}
//Used by NextShape() to access a shape in the query set
// TODO: only fetch 1000 rows at a time. This should check to see if the
// requested feature is in the set. If it is, return it, otherwise
// grab the next 1000 rows.
int msPOSTGISLayerGetShapeRandom(layerObj *layer, shapeObj *shape, long
*record)
{
msPOSTGISLayerInfo *layerinfo;
char *wkb;
int result,t,size;
char *temp,*temp2;
long record_oid;
layerinfo = (msPOSTGISLayerInfo *) layer->postgislayerinfo;
//fprintf(stderr,"msPOSTGISLayerGetShapeRandom : called row %li\n",record);
if (layerinfo == NULL)
{
msSetError(MS_QUERYERR, "GetShape called with layerinfo = NULL",
"msPOSTGISLayerGetShape()");
return(MS_FAILURE);
}
if (layerinfo->conn == NULL)
{
msSetError(MS_QUERYERR, "NextShape called on POSTGIS layer with
no connection to DB.",
"msPOSTGISLayerGetShape()");
return(MS_FAILURE);
}
if (layerinfo->query_result == NULL)
{
msSetError(MS_QUERYERR, "GetShape called on POSTGIS layer with
invalid DB query results.",
"msPOSTGISLayerGetShapeRandom()");
return(MS_FAILURE);
}
shape->type = MS_SHAPE_NULL;
while(shape->type == MS_SHAPE_NULL)
{
if ( (*record) < PQntuples(layerinfo->query_result) )
{
//retreive an item
wkb = (char *) PQgetvalue(layerinfo->query_result,
(*record), layer->numitems);
switch(layer->type)
{
case MS_LAYER_POINT:
result = force_to_points(wkb, shape);
break;
case MS_LAYER_LINE:
result = force_to_lines(wkb, shape);
break;
case MS_LAYER_POLYGON:
result = force_to_polygons(wkb, shape);
break;
case MS_LAYER_ANNOTATION:
case MS_LAYER_QUERY:
result = dont_force(wkb,shape);
break;
case MS_LAYER_RASTER:
msDebug( "Ignoring MS_LAYER_RASTER
in mappostgis.c\n" );
break;
case MS_LAYER_CIRCLE:
msDebug( "Ignoring MS_LAYER_RASTER
in mappostgis.c\n" );
break;
}
if (shape->type != MS_SHAPE_NULL)
{
//have to retreive the attributes
shape->values = (char **) malloc(sizeof(char *) *
layer->numitems);
for (t=0;t<layer->numitems;t++)
{
temp = (char *)
PQgetvalue(layerinfo->query_result, (*record), t);
size = PQgetlength(layerinfo->query_result,
(*record), t ) ;
temp2 = (char *) malloc(size+1 );
memcpy(temp2, temp, size);
temp2[size] = 0; //null terminate it
shape->values[t] = temp2;
}
temp = (char *) PQgetvalue(layerinfo->query_result,
(*record), t+1); // t is WKB, t+1 is OID
record_oid = strtol (temp,NULL,10);
shape->index = record_oid;
shape->numvalues = layer->numitems;
find_bounds(shape);
(*record)++; //move to next shape
return (MS_SUCCESS);
}
else
{
(*record)++; //move to next shape
}
}
else
{
return (MS_DONE);
}
}
msFreeShape(shape);
return(MS_FAILURE);
}
// Execute a query on the DB based on record being an OID.
int msPOSTGISLayerGetShape(layerObj *layer, shapeObj *shape, long record)
{
char *query_str;
char table_name[5000];
char geom_column_name[5000];
char urid_name[5000];
char user_srid[5000];
//int nitems;
char columns_wanted[5000];
char temp[5000];
PGresult *query_result;
msPOSTGISLayerInfo *layerinfo;
char *wkb;
int result,t,size;
char *temp1,*temp2;
//fprintf(stderr,"msPOSTGISLayerGetShape called for record = %i\n",record);
layerinfo = (msPOSTGISLayerInfo *) layer->postgislayerinfo;
if (layerinfo == NULL)
{
//layer not opened yet
msSetError(MS_QUERYERR, "msPOSTGISLayerGetShape called on
unopened layer (layerinfo = NULL)",
"msPOSTGISLayerGetShape()");
return(MS_FAILURE);
}
query_str = (char *) malloc(6000); //should be big enough
memset(query_str,0,6000); //zero it out
msPOSTGISLayerParseData(layer->data, geom_column_name, table_name,
urid_name,user_srid);
if (layer->numitems ==0) //dont need the oid since its really record
{
if (gBYTE_ORDER == LITTLE_ENDIAN)
sprintf(columns_wanted,"asbinary(force_collection(force_2d
(%s)),'NDR')", geom_column_name);
else
sprintf(columns_wanted,"asbinary(force_collection(force_2d
(%s)),'XDR')", geom_column_name);
}
else
{
columns_wanted[0] = 0; //len=0
for (t=0;t<layer->numitems; t++)
{
sprintf(temp,"%s::text,",layer->items[t]);
strcat(columns_wanted,temp);
}
if (gBYTE_ORDER == LITTLE_ENDIAN)
sprintf(temp,"asbinary(force_collection(force_2d
(%s)),'NDR')", geom_column_name);
else
sprintf(temp,"asbinary(force_collection(force_2d
(%s)),'XDR')", geom_column_name);
strcat(columns_wanted,temp);
}
sprintf(query_str,"DECLARE mycursor BINARY CURSOR FOR SELECT %s
from %s WHERE %s = %li", columns_wanted,table_name,urid_name,record);
//fprintf(stderr,"msPOSTGISLayerGetShape: %s \n",query_str);
query_result = PQexec(layerinfo->conn, "BEGIN");
if (!(query_result) || PQresultStatus(query_result) !=
PGRES_COMMAND_OK)
{
msSetError(MS_QUERYERR, "Error executing POSTGIS BEGIN
statement.",
"msPOSTGISLayerGetShape()");
PQclear(query_result);
query_result = NULL;
return(MS_FAILURE);
}
query_result = PQexec(layerinfo->conn, "set enable_seqscan = off");
if (!(query_result) || PQresultStatus(query_result) !=
PGRES_COMMAND_OK)
{
msSetError(MS_QUERYERR, "Error executing POSTGIS 'set
enable_seqscan off' statement.",
"msPOSTGISLayerGetShape()");
PQclear(query_result);
query_result = NULL;
return(MS_FAILURE);
}
PQclear(query_result);
query_result = PQexec(layerinfo->conn, query_str );
if (!(query_result) || PQresultStatus(query_result) !=
PGRES_COMMAND_OK)
{
char tmp[4000];
sprintf(tmp, "Error executing POSTGIS SQL statement (in FETCH
ALL): %s\n-%s\n<br>More Help:<br>",
query_str,PQerrorMessage(layerinfo->conn) );
msSetError(MS_QUERYERR,
DATAERRORMESSAGE("",tmp),
"msPOSTGISLayerGetShape()");
PQclear(query_result);
query_result = NULL;
return(MS_FAILURE);
}
PQclear(query_result);
query_result = PQexec(layerinfo->conn, "FETCH ALL in mycursor");
if (!(query_result) || PQresultStatus(query_result) !=
PGRES_TUPLES_OK)
{
char tmp[4000];
sprintf(tmp, "Error executing POSTGIS SQL statement (in
FETCH ALL): %s\n-%s\n", query_str,PQerrorMessage(layerinfo->conn) );
msSetError(MS_QUERYERR,
DATAERRORMESSAGE("",tmp),
"msPOSTGISLayerGetShape()");
PQclear(query_result);
query_result = NULL;
return(MS_FAILURE);
}
//query has been done, so we can retreive the results
shape->type = MS_SHAPE_NULL;
if ( 0 < PQntuples(query_result) ) //only need to get one shape
{
//retreive an item
wkb = (char *) PQgetvalue(query_result, 0, layer->numitems);
// layer->numitems is the wkt column
switch(layer->type)
{
case MS_LAYER_POINT:
result = force_to_points(wkb, shape);
break;
case MS_LAYER_LINE:
result = force_to_lines(wkb, shape);
break;
case MS_LAYER_POLYGON:
result = force_to_polygons(wkb, shape);
break;
case MS_LAYER_ANNOTATION:
case MS_LAYER_QUERY:
result = dont_force(wkb,shape);
break;
case MS_LAYER_RASTER:
msDebug( "Ignoring MS_LAYER_RASTER
in mappostgis.c\n" );
break;
case MS_LAYER_CIRCLE:
msDebug( "Ignoring MS_LAYER_RASTER
in mappostgis.c\n" );
}
if (shape->type != MS_SHAPE_NULL)
{
//have to retreive the attributes
shape->values = (char **) malloc(sizeof(char *) *
layer->numitems);
for (t=0;t<layer->numitems;t++)
{
//fprintf(stderr,"msPOSTGISLayerGetShape: finding attribute info for '%s'
\n",layer->items[t]);
temp1= (char *) PQgetvalue(query_result, 0, t);
size = PQgetlength(query_result,0, t ) ;
temp2 = (char *) malloc(size+1 );
memcpy(temp2, temp1, size);
temp2[size] = 0; //null terminate it
shape->values[t] = temp2;
//fprintf(stderr,"msPOSTGISLayerGetShape: shape->values[%i] has value '%s'
\n",t,shape->values[t]);
}
shape->index = record;
shape->numvalues = layer->numitems;
find_bounds(shape);
return (MS_SUCCESS);
}
}
else
{
return (MS_DONE);
}
msFreeShape(shape);
return(MS_FAILURE);
}
//query the DB for info about the requested table
//
// CHEAT: dont look in the system tables, get query optimization infomation
//
// get the table name, return a list of the possible columns (except
GEOMETRY column)
//
// found out this is called during a query
int msPOSTGISLayerGetItems(layerObj *layer)
{
msPOSTGISLayerInfo *layerinfo;
char table_name[5000];
char geom_column_name[5000];
char urid_name[5000];
char user_srid[5000];
char sql[6000];
//int nitems;
PGresult *query_result;
int t;
char *col;
char found_geom = 0;
int item_num;
//fprintf(stderr, "in msPOSTGISLayerGetItems (find column names)\n");
layerinfo = (msPOSTGISLayerInfo *) layer->postgislayerinfo;
if (layerinfo == NULL)
{
//layer not opened yet
msSetError(MS_QUERYERR, "msPOSTGISLayerGetItems called on
unopened layer",
"msPOSTGISLayerGetItems()");
return(MS_FAILURE);
}
if (layerinfo->conn == NULL)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerGetItems called on POSTGIS
layer with no connection to DB.",
"msPOSTGISLayerGetItems()");
return(MS_FAILURE);
}
//get the table name and geometry column name
msPOSTGISLayerParseData(layer->data, geom_column_name, table_name,
urid_name, user_srid);
// two cases here. One, its a table (use select * from table)
otherwise, just use the select clause
sprintf(sql,"SELECT * FROM %s LIMIT 0",table_name); // attempt the
query, but dont actually do much (this might take some time if there is an
order by!)
query_result = PQexec(layerinfo->conn, sql );
if (!(query_result) || PQresultStatus(query_result) != PGRES_TUPLES_OK)
{
char tmp[4000];
sprintf(tmp, "Error executing POSTGIS SQL statement
(in msPOSTGISLayerGetItems): %s\n-%s\n",
sql,PQerrorMessage(layerinfo->conn) );
msSetError(MS_QUERYERR,
DATAERRORMESSAGE("",tmp),
"msPOSTGISLayerGetItems()");
PQclear(query_result);
query_result = NULL;
return(MS_FAILURE);
}
layer->numitems = PQnfields(query_result)-1; //dont include the
geometry column
layer->items = malloc (sizeof(char *) * (layer->numitems+1) ); // +1
incase there is a problem finding goeometry column
// it will return an error if there is no geometry column found,
// so this isnt a problem
found_geom = 0; //havent found the geom field
item_num = 0;
for (t=0;t<PQnfields(query_result);t++)
{
col = PQfname(query_result,t);
if (strcmp(col, geom_column_name) != 0) // this isnt the geometry
column
{
layer->items[item_num] = (char*)malloc(strlen(col)+1);
strcpy(layer->items[item_num], col);
item_num++;
}
else
{
found_geom = 1;
}
}
PQclear(query_result);
query_result = NULL;
if (!(found_geom))
{
char tmp[4000];
sprintf(tmp, "msPOSTGISLayerGetItems: tried to find the geometry
column in the results from the database, but couldnt find it. Is it
miss-capitialized? '%s'", geom_column_name );
msSetError(MS_QUERYERR,
tmp,
"msPOSTGISLayerGetItems()");
PQclear(query_result);
query_result = NULL;
return(MS_FAILURE);
}
return msPOSTGISLayerInitItemInfo(layer);
}
//we return an infinite extent
// we could call the SQL AGGREGATE extent(GEOMETRY), but that would take
FOREVER
// to return (it has to read the entire table).
// So, we just tell it that we're everywhere and lets the spatial indexing
figure things out for us
//
// Never seen this function actually called
int msPOSTGISLayerGetExtent(layerObj *layer, rectObj *extent)
{
//fprintf(stderr,"msPOSTGISLayerGetExtent called\n");
extent->minx = extent->miny = -1.0*FLT_MAX ;
extent->maxx = extent->maxy = FLT_MAX;
return(MS_SUCCESS);
//this should get the real extents,but it requires a table read
// unforunately, there is no way to call this function from
mapscript, so its
// pretty useless. Untested since you cannot actually call it.
/*
PGresult *query_result;
char sql[5000];
msPOSTGISLayerInfo *layerinfo;
char table_name[5000];
char geom_column_name[5000];
char urid_name[5000];
char user_srid[5000];
if (layer == NULL)
{
char tmp[5000];
sprintf(tmp, "layer is null - have you opened the layer
yet?");
msSetError(MS_QUERYERR, tmp,
"msPOSTGISLayerGetExtent()");
return(MS_FAILURE);
}
layerinfo = (msPOSTGISLayerInfo *) layer->postgislayerinfo;
msPOSTGISLayerParseData(layer->data, geom_column_name,table_name,
urid_name,user_srid);
sprintf(sql,"select extent(%s) from %s", geom_column_name,table_name);
if (layerinfo->conn == NULL)
{
char tmp[5000];
sprintf(tmp, "layer doesnt have a postgis connection -
have you opened the layer yet?");
msSetError(MS_QUERYERR, tmp,
"msPOSTGISLayerGetExtent()");
return(MS_FAILURE);
}
query_result = PQexec(layerinfo->conn, sql);
if (!(query_result) || PQresultStatus(query_result) !=
PGRES_TUPLES_OK)
{
char tmp[5000];
sprintf(tmp, "Error executing POSTGIS SQL statement (in
msPOSTGISLayerGetExtent): %s", layerinfo->sql);
msSetError(MS_QUERYERR, tmp,
"msPOSTGISLayerGetExtent()");
PQclear(query_result);
return(MS_FAILURE);
}
if (PQntuples(query_result) != 1)
{
char tmp[5000];
sprintf(tmp, "Error executing POSTGIS SQL statement
(in msPOSTGISLayerGetExtent) [doesnt have exactly 1 result]: %s",
layerinfo->sql);
msSetError(MS_QUERYERR, tmp,
"msPOSTGISLayerGetExtent()");
PQclear(query_result);
return(MS_FAILURE);
}
sscanf(PQgetvalue(query_result,0,0),"%lf %lf %lf %lf", &extent->minx,
&extent->miny,&extent->maxx,&extent->maxy );
PQclear(query_result);
*/
}
/* Function to parse the Mapserver DATA parameter for geometry
* column name, table name and name of a column to serve as a
* unique record id
*/
int msPOSTGISLayerParseData(char *data, char *geom_column_name,
char *table_name, char *urid_name,char *user_srid)
{
char *pos_opt, *pos_scn, *tmp, *pos_srid;
int slength;
/* given a string of the from 'geom from ctivalues' or 'geom from ()
as foo'
* return geom_column_name as 'geom'
* and table name as 'ctivalues' or 'geom from () as foo'
*/
/* First look for the optional ' using unique ID' string */
pos_opt = strstrIgnoreCase(data, " using unique ");
if (pos_opt == NULL) {
/* No user specified unique id so we will use the Postgesql OID
*/
strcpy(urid_name, "OID");
}
else {
// CHANGE - protect the trailing edge for thing like 'using
unique ftab_id using srid=33'
tmp = strstr(pos_opt + 14," ");
if (tmp == NULL) //it lookes like 'using unique ftab_id'
{
strcpy(urid_name, pos_opt + 14);
}
else
{
//looks like ' using unique ftab_id ' (space at end)
strncpy(urid_name, pos_opt + 14, tmp-(pos_opt + 14 ) );
urid_name[tmp-(pos_opt + 14)] = 0; // null terminate it
}
}
pos_srid = strstrIgnoreCase(data," using SRID=");
if (pos_srid == NULL)
{
user_srid[0] = 0; // = ""
}
else
{
//find the srid
slength=strspn(pos_srid+12,"-0123456789");
if (slength == 0)
{
msSetError(MS_QUERYERR,
DATAERRORMESSAGE(data,"Error parsing POSTGIS data
variable: You specified 'using SRID=#' but didnt have any numbers!<br><br>
\n\nMore Help:<br><br>\n\n"),
"msPOSTGISLayerParseData()");
return(MS_FAILURE);
}
else
{
strncpy(user_srid,pos_srid+12,slength);
user_srid[slength] = 0; // null terminate it
}
}
// this is a little hack so the rest of the code works. If the '
using SRID=' comes before
// the ' using unique ', then make sure pos_opt points to where the '
using SRID' starts!
if (pos_opt == NULL)
{
pos_opt = pos_srid;
}
else
{
if (pos_srid != NULL)
{
if (pos_opt>pos_srid)
pos_opt = pos_srid;
}
}
/* Scan for the table or sub-select clause */
pos_scn = strstr(data, " from ");
if (pos_scn == NULL) {
msSetError(MS_QUERYERR,
DATAERRORMESSAGE(data,"Error parsing POSTGIS data
variable. Must contain 'geometry_column from table_name' or 'geom from
(subselect) as foo' (couldnt find ' from '). More help: <br><br>\n\n"),
"msPOSTGISLayerParseData()");
//msSetError(MS_QUERYERR, "Error parsing POSTGIS data variable.
Must contain 'geometry_column from table_name' or 'geom from (subselect) as
foo' (couldnt find ' from ').", "msPOSTGISLayerParseData()");
return(MS_FAILURE);
}
/* Copy the geometry column name */
memcpy(geom_column_name, data, (pos_scn)-(data));
geom_column_name[(pos_scn)-(data)] = 0; //null terminate it
/* Copy out the table name or sub-select clause */
if (pos_opt == NULL) {
strcpy(table_name, pos_scn + 6); //table name or sub-select
clause
}
else {
strncpy(table_name, pos_scn + 6, (pos_opt) - (pos_scn + 6));
table_name[(pos_opt) - (pos_scn + 6)] = 0; //null terminate it
}
if ( (strlen(table_name) < 1 ) || (strlen(geom_column_name) < 1 ) ) {
msSetError(MS_QUERYERR,
DATAERRORMESSAGE(data,"Error parsing POSTGIS data
variable. Must contain 'geometry_column from table_name' or 'geom from
(subselect) as foo' (couldnt find a geometry_column or table/subselect).
More help: <br><br>\n\n"),
"msPOSTGISLayerParseData()");
return(MS_FAILURE);
}
//printf("msPOSTGISLayerParseData: unique column = %s, srid='%s',
geom_column_name = %s, table_name=%s\n",
urid_name,user_srid,geom_column_name,table_name);
return(MS_SUCCESS);
}
#else
//prototypes if postgis isnt supposed to be compiled
int msPOSTGISLayerOpen(layerObj *layer)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerOpen called but
unimplemented! (mapserver not compiled with postgis support)",
"msPOSTGISLayerOpen()");
return(MS_FAILURE);
}
void msPOSTGISLayerFreeItemInfo(layerObj *layer)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerFreeItemInfo called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerFreeItemInfo()");
}
int msPOSTGISLayerInitItemInfo(layerObj *layer)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerInitItemInfo called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerInitItemInfo()");
return(MS_FAILURE);
}
int msPOSTGISLayerWhichShapes(layerObj *layer, rectObj rect)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerWhichShapes called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerWhichShapes()");
return(MS_FAILURE);
}
int msPOSTGISLayerClose(layerObj *layer)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerClose called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerClose()");
return(MS_FAILURE);
}
int msPOSTGISLayerNextShape(layerObj *layer, shapeObj *shape)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerNextShape called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerNextShape()");
return(MS_FAILURE);
}
int msPOSTGISLayerGetShape(layerObj *layer, shapeObj *shape, long record)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerGetShape called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerGetShape()");
return(MS_FAILURE);
}
int msPOSTGISLayerGetExtent(layerObj *layer, rectObj *extent)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerGetExtent called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerGetExtent()");
return(MS_FAILURE);
}
int msPOSTGISLayerGetShapeRandom(layerObj *layer, shapeObj *shape, long
*record)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerGetShapeRandom called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerGetShapeRandom()");
return(MS_FAILURE);
}
int msPOSTGISLayerGetItems(layerObj *layer)
{
msSetError(MS_QUERYERR, "msPOSTGISLayerGetItems called but
unimplemented!(mapserver not compiled with postgis support)",
"msPOSTGISLayerGetItems()");
return(MS_FAILURE);
}
// end above's #ifdef USE_POSTGIS
#endif
--------------010709050900000403030207--
--__--__--
Message: 9
From: "pond bear" <pond_bear at hotmail.com>
To: mapserver-users at lists.gis.umn.edu
Date: Mon, 14 Apr 2003 16:04:16 -0500
Subject: [Mapserver-users] another bug of mapserver 3.7
Right now we can chose band combination of a raster file by changing map
file with
"processing bands=x,x,x". But we can't change band combination by
php-mapscript.
There is no member in LayerObj that corresponds "PROCESSING".
Jing
University of North Dakota
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
--__--__--
Message: 10
Subject: RE: [Mapserver-users] can't install ...still
Date: Tue, 15 Apr 2003 09:00:21 +1000
From: <Timothy.Mackey at ga.gov.au>
To: <dendi_rm at hmgf.geoph.itb.ac.id>, <jhart at frw.uva.nl>
Cc: <mapserver-users at lists.gis.umn.edu>
I also got this error. It's related to using a C compiler to link C++ code.
I fixed it by editing the file Makefile and replacing 'LD = gcc' with 'LD
= g++'
regards,
Tim Mackey
Webmaster
Geoscience Australia
timothy.mackey at ga.gov.au
http://www.ga.gov.au
-----Original Message-----
From: Ramadhani [mailto:dendi_rm at hmgf.geoph.itb.ac.id]
Sent: Tuesday, 15 April 2003 2:24 AM
To: Jan Hartmann
Cc: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] can't install ...still
hi,
i'm new in mapserver
when i want to make install mapserver ...it wuoldn't work
there's warn ==> ./libmap.a(mapogr.o)(.eh_frame+0x11): undefined reference
to '__gxx_personality_v0'
what shoul i to do ?
thanx
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--__--__--
Message: 11
Date: Mon, 14 Apr 2003 17:39:05 -0700
From: Jerritt Collord <collord at linuxfund.org>
To: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] blank images from mapserv cgi, not
php/mapscript, shp2img, etc.
This particular droplet of knowledge did manage to wet my forehead, with
a little off-list help.
On further reading, it's clear, and it *almost* makes sense in the
Mapserver vs. Mapscript case. What I don't understand is when shp2png
which accepts explicitly layers to render with -l doesn't behave in the
same way as the CGI.
Thank you for the repsonse and thank you mapserver community for quite
fine software.
Jerritt
On Mon, 14 Apr 2003 10:47:17 +0200
"Jan Hartmann" <jhart at frw.uva.nl> wrote:
> Jerrit,
>
> You have to set STATUS DEFAULT. This is different in MapServer CGI and
> MapScript: with CGI a layer is shown by default only when STATUS is
> DEFAULT layers with STATUS ON are visible only when specified in the
> URL. In MapScript layers with STATUS ON are visible by default. I
> don't know why this is so; practically everyone (including myself) has
> stumbled over that one.
>
> There is an extensive list of postings on this matter: search for
> STATUS DEFAULT on the user's list. Of course, when you had known that
> you should look for STATUS DEFAULT, you would already have known the
> answer :-) . That's always the problem with searching a mailing list.
>
> Jan
>
> Jerritt Collord wrote:
> > For the life of me (yes, after searching archives, etc.) I can't get
> > the mapserv CGI to produce anything but blank PNGs... though I can
> > set IMAGECOLOR and get a colored blank PNG.
> >
> > PHP/mapscript with similar mapfiles and the command line shp2img and
> > shp2pdf can produce correct PNGs.
> >
> > Both 3.6.5 and 3.7 versions attempted. Both with html TEMPLATE and
> > directly with mode=map in the GET. Logging, when enabled, indicates
> > "normal execution".
> >
> > Thanks,
> >
> > Jerritt Collord
> >
> > ------
> >
> > NAME SHIZZLE
> > SIZE 400 400
> > STATUS ON
> > SYMBOLSET symbols.sym
> > EXTENT -5000000 -4000000 3000000 10000000
> > UNITS METERS
> > SHAPEPATH "/usr/lib/cgi-bin/maps"
> > WEB
> > IMAGEPATH "/var/www/tmp/"
> > IMAGEURL "/tmp/"
> > END
> > LAYER
> > NAME europa_shapes
> > TYPE POLYGON
> > STATUS ON
> > DATA europa
> > CLASS
> > COLOR 110 50 100
> > OUTLINECOLOR 200 200 200
> > END
> > END
> > END
> > END
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> Jan Hartmann
> Department of Geography
> University of Amsterdam
> jhart at frw.uva.nl
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--__--__--
Message: 12
Date: Mon, 14 Apr 2003 18:04:53 -0700
From: Jerritt Collord <collord at linuxfund.org>
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] 3.7 nightly and python/mapscript errors
SWIG stuff I wouldn't know where to start tracking down! The mapfile
should be fine--I use it in all other interfaces okay--and it doesn't
smell like that kind of problem.
Thanks,
Jerritt
gurgle:/usr/lib/cgi-bin# ./testpy.py
Traceback (most recent call last):
File "./testpy.py", line 14, in ?
drawmap()
File "./testpy.py", line 11, in drawmap
out = myimage.saveImage("euro.png",MS_PNG,50,0,50)
File "/usr/lib/python2.1/site-packages/mapscript.py", line 1770, in
<lambda> __getattr__ = lambda self, name: _swig_getattr(self,
imageObj, name) File "/usr/lib/python2.1/site-packages/mapscript.py",
line 19, in _swig_getattr raise AttributeError,name
AttributeError: saveImage
gurgle:/usr/lib/cgi-bin# cat testpy.py
#!/usr/bin/python2.1
import mapscript
def drawmap():
mymap = mapscript.mapObj("/usr/lib/cgi-bin/maps/europe.map")
mymap.width=600
mymap.height=400
myimage=mymap.draw()
out = myimage.saveImage("euro.png",MS_PNG,50,0,50)
return out
drawmap()
--__--__--
Message: 13
Date: Mon, 14 Apr 2003 21:52:35 -0600
Subject: Re: [Mapserver-users] 3.7 nightly and python/mapscript errors
Cc: mapserver-users at lists.gis.umn.edu
To: Jerritt Collord <collord at linuxfund.org>
From: Sean Gillies <sgillies at frii.com>
Jerritt,
saveImage() is long gone from the nightly MapScript. Use save().
Your script then would be something like:
#!/usr/bin/python2.1
import mapscript
def drawmap():
mymap = mapscript.mapObj("/usr/lib/cgi-bin/maps/europe.map")
mymap.width=600
mymap.height=400
myimage=mymap.draw()
# Just specify filename as argument to 'save', all other
# parameters come from the map's outputformat
save_result = myimage.save("euro.png")
# The Python way would be to raise an error instead of
# returning a value
if not save_result == mapscript.MS_SUCCESS:
raise IOError, "Could not save to euro.png in drawmap()"
drawmap()
Take a look at the latest (3.7) documentation regarding map
outputformats and you'll see how to set the transparency and
such to suit your needs.
Also, don't forget that the Python MapScript has a saveToString()
method which Perl has not. Comes in handy when you'd like to
have image data in memory rather than on disk.
image_string = myimage.saveToString()
cheers,
Sean
On Monday, April 14, 2003, at 07:04 PM, Jerritt Collord wrote:
>
> SWIG stuff I wouldn't know where to start tracking down! The mapfile
> should be fine--I use it in all other interfaces okay--and it doesn't
> smell like that kind of problem.
>
> Thanks,
>
> Jerritt
>
> gurgle:/usr/lib/cgi-bin# ./testpy.py
> Traceback (most recent call last):
> File "./testpy.py", line 14, in ?
> drawmap()
> File "./testpy.py", line 11, in drawmap
> out = myimage.saveImage("euro.png",MS_PNG,50,0,50)
> File "/usr/lib/python2.1/site-packages/mapscript.py", line 1770, in
> <lambda> __getattr__ = lambda self, name: _swig_getattr(self,
> imageObj, name) File "/usr/lib/python2.1/site-packages/mapscript.py",
> line 19, in _swig_getattr raise AttributeError,name
> AttributeError: saveImage
>
> gurgle:/usr/lib/cgi-bin# cat testpy.py
> #!/usr/bin/python2.1
> import mapscript
> def drawmap():
> mymap = mapscript.mapObj("/usr/lib/cgi-bin/maps/europe.map")
> mymap.width=600
> mymap.height=400
> myimage=mymap.draw()
> out = myimage.saveImage("euro.png",MS_PNG,50,0,50)
> return out
> drawmap()
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
--
Sean Gillies
sgillies at frii.com
http://www.frii.com/~sgillies
--__--__--
Message: 14
Date: Tue, 15 Apr 2003 10:36:51 +0700 (WIT)
From: Ramadhani <dendi_rm at hmgf.geoph.itb.ac.id>
To: Timothy.Mackey at ga.gov.au
Cc: jhart at frw.uva.nl, <mapserver-users at lists.gis.umn.edu>
Subject: RE: [Mapserver-users] can't install ...still
i've passed the '__gxx_personality_v0' error, but at final just copy -f
libmap.a /usr/local/lib and copy -f map.h
/usr/local/include/mapserver-3.5/
is it really final of the installation ?
i configure in /usr/local/mapserver
how to start using mapserver ...
regards,
dendi
still confuse
On Tue, 15 Apr 2003 Timothy.Mackey at ga.gov.au wrote:
> I also got this error. It's related to using a C compiler to link C++
code.
>
> I fixed it by editing the file Makefile and replacing 'LD = gcc' with 'LD
= g++'
>
> regards,
>
> Tim Mackey
> Webmaster
> Geoscience Australia
> timothy.mackey at ga.gov.au
> http://www.ga.gov.au
>
>
>
> -----Original Message-----
> From: Ramadhani [mailto:dendi_rm at hmgf.geoph.itb.ac.id]
> Sent: Tuesday, 15 April 2003 2:24 AM
> To: Jan Hartmann
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: [Mapserver-users] can't install ...still
>
>
> hi,
>
> i'm new in mapserver
> when i want to make install mapserver ...it wuoldn't work
> there's warn ==> ./libmap.a(mapogr.o)(.eh_frame+0x11): undefined
reference
> to '__gxx_personality_v0'
>
> what shoul i to do ?
>
> thanx
>
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
--__--__--
Message: 15
From: "Emmanuel FOURNAUX" <manufournaux at hotmail.com>
To: mapserver-users at lists.gis.umn.edu
Date: Tue, 15 Apr 2003 09:28:39 +0200
Subject: [Mapserver-users] Java API for MapServer?
Hello,
I've just discovered MapServer Open source WMS and I have an important
question for our business:
Is it possible to write java beans that manipulate Map Server Java =
objects ?
In other terms, a "MapServer Java Connector" (like ESRI ArcIMS Java
Connector) is (or will be) available?
Thanks a lot for your response.
Emmanuel Fournaux
NSI SA
e.fournaux at nsi-sa.be
_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous !
http://search.fr.msn.be
--__--__--
Message: 16
Date: Mon, 14 Apr 2003 23:36:33 -0700
From: Jerritt Collord <collord at linuxfund.org>
To: Sean Gillies <sgillies at frii.com>
Cc: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] 3.7 nightly and python/mapscript errors
> saveImage() is long gone from the nightly MapScript. Use save().
> Your script then would be something like:
Superb! works. The only documentation I could find was examples on this
list and I didn't know better that to try this obsoleted function.
Calling a function that doesn't exist certainly would produce a SWIG
error.
> Take a look at the latest (3.7) documentation regarding map
> outputformats and you'll see how to set the transparency and
> such to suit your needs.
Will do, thank you.
> Also, don't forget that the Python MapScript has a saveToString()
> method which Perl has not. Comes in handy when you'd like to
> have image data in memory rather than on disk.
>
> image_string = myimage.saveToString()
This is a cool feature.... but it segfaults for me. I can't make much
out of the strace.
Thanks,
Jerritt
>
> On Monday, April 14, 2003, at 07:04 PM, Jerritt Collord wrote:
>
> >
> > SWIG stuff I wouldn't know where to start tracking down! The mapfile
> > should be fine--I use it in all other interfaces okay--and it
> > doesn't smell like that kind of problem.
> >
> > Thanks,
> >
> > Jerritt
> >
> > gurgle:/usr/lib/cgi-bin# ./testpy.py
> > Traceback (most recent call last):
> > File "./testpy.py", line 14, in ?
> > drawmap()
> > File "./testpy.py", line 11, in drawmap
> > out = myimage.saveImage("euro.png",MS_PNG,50,0,50)
> > File "/usr/lib/python2.1/site-packages/mapscript.py", line 1770,
> > in<lambda> __getattr__ = lambda self, name: _swig_getattr(self,
> > imageObj, name) File
> > "/usr/lib/python2.1/site-packages/mapscript.py", line 19, in
> > _swig_getattr raise AttributeError,name AttributeError: saveImage
> >
> > gurgle:/usr/lib/cgi-bin# cat testpy.py
> > #!/usr/bin/python2.1
> > import mapscript
> > def drawmap():
> > mymap = mapscript.mapObj("/usr/lib/cgi-bin/maps/europe.map")
> > mymap.width=600
> > mymap.height=400
> > myimage=mymap.draw()
> > out = myimage.saveImage("euro.png",MS_PNG,50,0,50)
> > return out
> > drawmap()
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
> >
> --
> Sean Gillies
> sgillies at frii.com
> http://www.frii.com/~sgillies
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--__--__--
Message: 17
From: Vincent Schut <schut at sarvision.com>
Organization: SarVision BV
To: Ramadhani <dendi_rm at hmgf.geoph.itb.ac.id>, Timothy.Mackey at ga.gov.au
Subject: Re: [Mapserver-users] can't install ...still
Date: Tue, 15 Apr 2003 09:46:51 +0200
Cc: jhart at frw.uva.nl, <mapserver-users at lists.gis.umn.edu>
Dendi,
some things about installing mapserver:
- do not use 'make install'. It will give you trouble when you compile a
newer
version of mapserver later, as this new version will then link against the
old libmap.a. Instead, just copy the mapserv executable to your cgi-bin
directory, and eventual mapscript flavours to their apropriate dirs.
- A guess that you do not need - in fact should not - copy or move libmap.a
and include files to anywhere. There are no applications that I know that
link against mapserver and thus would need this, and it might give you the
same problems as above mentioned when using 'make install'. AFAIK, the
mapserver/mapscript binaries are all linked statically against libmap.a, so
after compiling it is not needed anywhere. There are quite some posts about
people having weird troubles upgrading mapserver, till they found out that
some time long ago they once did 'make install' and that's why mapserver
did
not work anymore for them...
About getting started, there's a lot of documentation and examples on the
website. It all depends on what you want and how you intend to use
mapserver.
Please check that out.
Regards,
Vincent Schut.
On Tuesday 15 April 2003 05:36, Ramadhani wrote:
> i've passed the '__gxx_personality_v0' error, but at final just copy -f
> libmap.a /usr/local/lib and copy -f map.h
> /usr/local/include/mapserver-3.5/
> is it really final of the installation ?
> i configure in /usr/local/mapserver
>
> how to start using mapserver ...
>
> regards,
>
> dendi
> still confuse
>
> On Tue, 15 Apr 2003 Timothy.Mackey at ga.gov.au wrote:
> > I also got this error. It's related to using a C compiler to link C++
> > code.
> >
> > I fixed it by editing the file Makefile and replacing 'LD = gcc' with
'LD
> > = g++'
> >
> > regards,
> >
> > Tim Mackey
> > Webmaster
> > Geoscience Australia
> > timothy.mackey at ga.gov.au
> > http://www.ga.gov.au
> >
> >
> >
> > -----Original Message-----
> > From: Ramadhani [mailto:dendi_rm at hmgf.geoph.itb.ac.id]
> > Sent: Tuesday, 15 April 2003 2:24 AM
> > To: Jan Hartmann
> > Cc: mapserver-users at lists.gis.umn.edu
> > Subject: [Mapserver-users] can't install ...still
> >
> >
> > hi,
> >
> > i'm new in mapserver
> > when i want to make install mapserver ...it wuoldn't work
> > there's warn ==> ./libmap.a(mapogr.o)(.eh_frame+0x11): undefined
> > reference to '__gxx_personality_v0'
> >
> > what shoul i to do ?
> >
> > thanx
> >
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--
______________________________________
Vincent Schut (schut at sarvision.com)
Sarvision B.V.
Wageningen, The Netherlands
www.sarvision.com
--__--__--
Message: 18
Organization: DFKI Saarbruecken GmbH, D 66123 Saarbruecken
Date: Tue, 15 Apr 2003 10:49:37 +0200
From: Sven Jacobi <jacobi at dfki.de>
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Tile a map
Hi list,
where can I read more about "tiling a map"?
At the moment I use "gdaltindex", but the
tiffs and tfws are given to that procedure, so
I'm not able to have influence.
I want to tile a very big aerial picture with
a given worldfile into several smaller files
with correspondending worldfiles without
using ArcInfo or ArcView.
Is there any description available?
Thanks in forward,
Sven
--__--__--
Message: 19
From: "Alessandro Galasso" <agalasso at gndci.cs.cnr.it>
To: <Mapserver-users at lists.gis.umn.edu>
Date: Tue, 15 Apr 2003 11:59:19 +0200
Subject: [Mapserver-users] mystake in doc??
This is a multi-part message in MIME format.
------=_NextPart_000_0015_01C30346.7234C1C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
From: mapfile-reference.html
"Join Object
[...]Joins are defined within a query object."
Is Join Object defined within CLASS objects??=20
---
Alessandro Galasso
------=_NextPart_000_0015_01C30346.7234C1C0
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.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>From: =
mapfile-reference.html</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Join Object<BR>[...]Joins are defined =
within a=20
query object."</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is Join Object defined within =
CLASS objects??=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>---<BR>Alessandro=20
Galasso<BR></FONT></DIV></BODY></HTML>
------=_NextPart_000_0015_01C30346.7234C1C0--
--__--__--
Message: 20
From: Sreekanth S Rameshaiah <sree at mahiti.org>
To: mapserver-users at lists.gis.umn.edu
Date: 15 Apr 2003 16:28:23 +0530
Subject: [Mapserver-users] png images is broken in mapserver itasca demo
Dear all,
Greetings,
I have installed Mapserver 3.6.5
The PNG image is broken in mapserver demo. the image refers to
/tmp/{random number}.png
But in /var/www/html/tmp/ no such file is generated.
What could be the cause.
Regards,
- sree
--__--__--
Message: 21
Date: Tue, 15 Apr 2003 13:27:15 +0200
From: Jan Hartmann <jhart at frw.uva.nl>
Organization: University of Amsterdam
To: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] Tile a map
Sven,
You can use gdal_translate for that. With the -srcwin flag you can
specify offset and width from the input image to be translated to the
output image.
Jan
Sven Jacobi wrote:
> Hi list,
>
> where can I read more about "tiling a map"?
> At the moment I use "gdaltindex", but the
> tiffs and tfws are given to that procedure, so
> I'm not able to have influence.
> I want to tile a very big aerial picture with
> a given worldfile into several smaller files
> with correspondending worldfiles without
> using ArcInfo or ArcView.
> Is there any description available?
>
> Thanks in forward,
>
> Sven
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
--__--__--
Message: 22
From: "Shannon Scott" <sscott at gwi.net>
To: <Mapserver-users at lists.gis.umn.edu>
Date: Tue, 15 Apr 2003 08:04:17 -0400
Subject: [Mapserver-users] LABELREQUIRES or REQUIRES
This is a multi-part message in MIME format.
------=_NextPart_000_0079_01C30325.9CAA5DF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello,
Whenever I try to use LABELREQUIRES or REQUIRES I get the following =
error:
getString(): Symbol definition error. ([majorcities] !=3D 1):(736)=20
I have tried other layers and using group names, but nothing works.
I have seen others with the same problem in the list archives. Does =
anyone know what I could be doing wrong?
MapServer 3.6
Apache CGI
Linux RedHat 8.0
------=_NextPart_000_0079_01C30325.9CAA5DF0
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.2719.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D1><FONT size=3D1><FONT face=3DArial=20
size=3D2>Hello,</FONT></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Whenever I try to use =
LABELREQUIRES or=20
REQUIRES I get the following error:</FONT></DIV>
<DIV><FONT size=3D1><FONT size=3D1><FONT face=3DArial=20
size=3D2></FONT></FONT></FONT> </DIV>
<DIV><FONT size=3D1><FONT size=3D1><FONT face=3DArial =
size=3D2>getString(): Symbol=20
definition error. ([majorcities] !=3D 1):(736)</FONT> =
</FONT></FONT></DIV>
<DIV><FONT size=3D1><FONT size=3D1><FONT face=3DArial=20
size=3D2></FONT></FONT></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have tried other layers and using =
group names,=20
but nothing works.</FONT></DIV>
<DIV><FONT size=3D1><FONT size=3D1><FONT face=3DArial size=3D2>I have =
seen others with=20
the same problem in the list archives. Does anyone know what I =
could be=20
doing wrong?</FONT></FONT></FONT></DIV>
<DIV><FONT size=3D1><FONT size=3D1><FONT face=3DArial=20
size=3D2></FONT></FONT></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>MapServer 3.6</FONT></DIV>
<DIV><FONT size=3D1><FONT size=3D1><FONT face=3DArial size=3D2>Apache=20
CGI</FONT></FONT></FONT></DIV>
<DIV><FONT size=3D1><FONT size=3D1><FONT face=3DArial size=3D2>Linux =
RedHat=20
8.0</FONT></DIV></FONT></FONT>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_0079_01C30325.9CAA5DF0--
--__--__--
Message: 23
Date: Tue, 15 Apr 2003 08:39:06 -0400
From: Dave McIlhagga <mcilhagga at dmsolutions.ca>
To: mapserver <mapserver-users at lists.gis.umn.edu>,
Chris Lockner
<chris at lochner.ca>
Subject: [Mapserver-users] [Fwd: [maplab-users] class and style changes in
Mapscript 37]
This is better directed to the MapServer mailing list.
-------- Original Message --------
Subject: [maplab-users] class and style changes in Mapscript 37
Date: Mon, 14 Apr 2003 11:07:19 -0400
From: "Lochner,Chris [NCR]" <Chris.Lochner at ec.gc.ca>
To: "'maplab-users at dmsolutions.ca'" <maplab-users at dmsolutions.ca>
Hi Folks,
I've been having great difficulty using the new style functions in
Mapscript 37.
I'm trying to extract a class object from the mapfile and change the
symbol size and color in php.
I have tried various adaptations of the mapscript 36 method but they are
quite dissimilar due to the new "style-type" instructions that 37 uses.
I've been working off the manual that Danielle (Morrisette) wrote for 37.
Here is part of the code, there are lots of different ideas in here from
other versions of mapscript but none of them seem to work,
$class = ms_newClassObj($layer);
//$class = $layer->getClass(0);
//printf("classname = %s",$class->name);
//printf("symbol under class =
%s",$class->get("symbol"));
//$class->set("symbol", "square");
$style = ms_newStyleObj($class);
$style->color->setRGB($rgb[r], $rgb[g], $rgb[b]);
//$class->set("color", $colorId);
$style->size = 1;
$style->symbol = 6;
//$class->set("size", 4);
if ($HTTP_FORM_VARS["CURRENT_PROG_ID"] == $ProgramIds[$iRow]||
($HTTP_FORM_VARS["CURRENT_PROG_ID"] <= 0 &&
$HTTP_FORM_VARS["CURRENT_PROG_ID2"] == $ProgramIds
[$iRow]))
{
$style->symbol = 2;
$style->size = 1;
//$class->set("size", 8);
}
else if ($ProgramCategory[$iRow] == 2) {
$style->symbol = 4;
//$class->set("symbol", 4);
}
else {
$style->symbolname = "star";
//$class->set("symbol", 3);
}
$style->outlinecolor->setRGB(0, 0, 0);
Am I on the right track with any of these? Any tips would be appreciated.
Cheers,
Chris Lochner
Lochner inc,
(Environment Canada - Water Quality Branch)
--__--__--
Message: 24
Date: Tue, 15 Apr 2003 10:25:19 -0400
From: Daniel Morissette <morissette at dmsolutions.ca>
To: "Aaron D. Hunt" <hunt at zedxinc.com>
CC: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] masking
> "Aaron D. Hunt" wrote:
>
> Is there anyway to make a mask in mapserver? I need to block out
> anything outside of a polygon.
>
Masks are not directly supported, but this can be achieved using the
pasteImage() method in PHP MapScript. Search the archives for "mask"
and for "pasteImage" and you should find a few posts with examples.
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
--__--__--
Message: 25
Date: Tue, 15 Apr 2003 10:34:46 -0400
From: Daniel Morissette <morissette at dmsolutions.ca>
To: pond bear <pond_bear at hotmail.com>
CC: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] another bug of mapserver 3.7
pond bear wrote:
>
> Right now we can chose band combination of a raster file by changing map
> file with
> "processing bands=x,x,x". But we can't change band combination by
> php-mapscript.
> There is no member in LayerObj that corresponds "PROCESSING".
>
I've filed this in bugzilla so that we don't forget:
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=312
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
--__--__--
Message: 26
Date: Tue, 15 Apr 2003 08:42:54 -0600
Subject: Re: [Mapserver-users] 3.7 nightly and python/mapscript errors
Cc: mapserver-users at lists.gis.umn.edu
To: Jerritt Collord <collord at linuxfund.org>
From: Sean Gillies <sgillies at frii.com>
On Tuesday, April 15, 2003, at 12:36 AM, Jerritt Collord wrote:
>
>
>> saveImage() is long gone from the nightly MapScript. Use save().
>> Your script then would be something like:
>
> Superb! works. The only documentation I could find was examples on this
> list and I didn't know better that to try this obsoleted function.
> Calling a function that doesn't exist certainly would produce a SWIG
> error.
>
>> Take a look at the latest (3.7) documentation regarding map
>> outputformats and you'll see how to set the transparency and
>> such to suit your needs.
>
> Will do, thank you.
>
>> Also, don't forget that the Python MapScript has a saveToString()
>> method which Perl has not. Comes in handy when you'd like to
>> have image data in memory rather than on disk.
>>
>> image_string = myimage.saveToString()
>
> This is a cool feature.... but it segfaults for me. I can't make much
> out of the strace.
>
> Thanks,
>
> Jerritt
>
>
Jerritt,
Since I've seen no segfaults from saveToString() on Win32, Linux,
or OS X, I suspect that it may be your GD library. What version
are you using? You will need version 2 of the GD library
to take advantage of many new features in the nightly (3.7)
MapServer. I'm using 2.0.11 and the MapServer developers are
using this, or more recent.
I have an interest in stomping out any bugs in the Python MapScript,
so if you sent me the trace I would look it over.
cheers,
Sean
--
Sean Gillies
sgillies at frii.com
http://www.frii.com/~sgillies
--__--__--
Message: 27
From: "Aaron D. Hunt" <hunt at zedxinc.com>
To: <mapserver-users at lists.gis.umn.edu>,
"Daniel Morissette" <morissette at dmsolutions.ca>
Subject: Re: [Mapserver-users] masking
Date: Tue, 15 Apr 2003 11:00:10 -0400
I think a masking function would be a nice item to add to mapserver. Maybe
a
class item MASK where 1 is mask everything outside the area.
----- Original Message -----
From: "Daniel Morissette" <morissette at dmsolutions.ca>
To: "Aaron D. Hunt" <hunt at zedxinc.com>
Cc: <mapserver-users at lists.gis.umn.edu>
Sent: Tuesday, April 15, 2003 10:25 AM
Subject: Re: [Mapserver-users] masking
> > "Aaron D. Hunt" wrote:
> >
> > Is there anyway to make a mask in mapserver? I need to block out
> > anything outside of a polygon.
> >
>
> Masks are not directly supported, but this can be achieved using the
> pasteImage() method in PHP MapScript. Search the archives for "mask"
> and for "pasteImage" and you should find a few posts with examples.
>
> --
> ------------------------------------------------------------
> Daniel Morissette morissette at dmsolutions.ca
> DM Solutions Group http://www.dmsolutions.ca/
> ------------------------------------------------------------
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
--__--__--
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
End of Mapserver-users Digest
More information about the MapServer-users
mailing list