-----Original Message----- From: UMN MapServer Users List [mailto:[EMAIL PROTECTED] On Behalf Of MAPSERVER-USERS automatic digest system Sent: 03 August 2007 06:05 To: [email protected] Subject: MAPSERVER-USERS Digest - 1 Aug 2007 to 2 Aug 2007 (#2007-210)
There are 7 messages totalling 472 lines in this issue. Topics of the day: 1. What happend to OGR OVF layers since gdal 1.3.1 2. Adding XY tables in MapServer (2) 3. postGIS wfs layer won't work 4. mapscript layer.setFilter() 5. PHP/MapScript on Debian and Ubuntu (2) ---------------------------------------------------------------------- Date: Thu, 2 Aug 2007 10:37:56 +0200 From: Huub Fleuren <[EMAIL PROTECTED]> Subject: Re: What happend to OGR OVF layers since gdal 1.3.1 Thanks Frank for your answer: Huub wrote: >> msOGRFileNextShape(): OGR error. No column definitions found for table > 'q_getBBoxAbonnement_1', layer not usable Frank wrote: >This indicates that OGR tried to initialize access to a table called q_getBBoxAbonnement_l but it could not find any understandable field definitions. You suggested to specify the geo-table like: <SrcDataSource>ODBC:admin/[EMAIL PROTECTED],wwall</SrcDataSource> but that did did not work The query q_getBBoxAbonnement_l existed in the database, by the unlying table didn't exist anymore, much like you were guessing. The query is not used in any way though. Obviously the process of accessing ODBC:admin/[EMAIL PROTECTED] now evaluates all the tables and views listed in the database. Deleting the obsolete object was the solution in this case. It has helped to keep the database cleaner:-) I'm happy now with the upgrade to mapserver 4.10.2 and gdal 1.4.2 Regards, Huub > Hi List, > > > This is question about different gdal versions working on OVF layers > > OGRINFO of any GDAL version gives me the data from such a layer using > ogrinfo layer.ovf -al Versions 4.5, 4.8, 4.10.0 4.10.2 of mapserver > compiled against gdal > 1.3.1 work OKE but later GDAL versions give errors > > layerdefinition > -------------- > LAYER > NAME kpxy > TYPE POINT > CONNECTIONTYPE OGR > CONNECTION "<OGRVRTDataSource> > <OGRVRTLayer name='kpxy'> > <SrcDataSource>ODBC:admin/[EMAIL PROTECTED]</SrcDataSource> > <SrcSQL>SELECT k.kp_nr as kp_nr,k.x as x, k.y as y, > w.wegbeheerdercode as wegbeheerdercode, w.onderhoudsinstantiecode as > onderhoudsinstantiecode FROM wwall w, kpxy k WHERE NOT (k.soort LIKE > 'D') and (w.x > %xmin%) and (w.x < %xmax%) and (w.y > %ymin%) > and (w.y < %ymax%) and (w.kruispuntnummer = k.kp_nr)</SrcSQL> > <GeometryType>wkbPoint</GeometryType> > <LayerSRS>WGS84</LayerSRS> > <GeometryField encoding='PointFromColumns' x='x' y='y'/> > </OGRVRTLayer> > </OGRVRTDataSource>" > DATA "kpxy" # the name of the OGRVrtLayer > > etc. > > > errors > ------- > > GDAL 1.3.2 > > <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE > ServiceExceptionReport SYSTEM > "http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd"> > <ServiceExceptionReport version="1.1.0"> <ServiceException> > msDrawMap(): Image handling error. Failed to draw layer named > 'kpxy'. > msOGRFileNextShape(): OGR error. SetAttributeFilter() not supported on > ExecuteSQL() results. > </ServiceException> > </ServiceExceptionReport> > > GDAL 1.4.2 > > <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE > ServiceExceptionReport SYSTEM > "http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd"> > <ServiceExceptionReport version="1.1.0"> <ServiceException> > msDrawMap(): Image handling error. Failed to draw layer named > 'kpxy'. > msOGRFileNextShape(): OGR error. No column definitions found for table > 'q_getBBoxAbonnement_1', layer not usable . > </ServiceException> > </ServiceExceptionReport> > > > I did not find documentation on changes concerning OVF layers. What > happened? > > > > > Regards, Huub > > ------------------------------ Date: Thu, 2 Aug 2007 12:44:20 -0500 From: Lawrence Hartpence <[EMAIL PROTECTED]> Subject: Adding XY tables in MapServer Hello, I know this has been discussed before, but I need more specifics. I have an Access table with XY values. I need to bring this into MapServ= er. I understand that I would an OGR connection. I saw examples of connecti= ng via OGR with different file types, but I need an example using ODBC conne= ction. If anyone can point me in the right direction I would appreciate it. Lawrence Hartpence ------------------------------ Date: Thu, 2 Aug 2007 15:23:01 -0400 From: Frank Warmerdam <[EMAIL PROTECTED]> Subject: Re: Adding XY tables in MapServer Lawrence Hartpence wrote: > Hello, > > I know this has been discussed before, but I need more specifics. > > I have an Access table with XY values. I need to bring this into MapServer. > I understand that I would an OGR connection. I saw examples of > connecting via OGR with different file types, but I need an example using ODBC connection. > > If anyone can point me in the right direction I would appreciate it. Lawrence, I think you want to read over: http://mapserver.gis.umn.edu/docs/reference/vector_data/VirtualSpatialDa ta This should really be referenced from the http://mapserver.gis.umn.edu/docs/howto/ogr_howto document too! I knew the material existed but I it took me a while to find it. Best regards -- ---------------------------------------+-------------------------------- ---------------------------------------+------ I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | President OSGeo, http://osgeo.org ------------------------------ Date: Thu, 2 Aug 2007 22:21:34 +0200 From: Milo van der Linden <[EMAIL PROTECTED]> Subject: postGIS wfs layer won't work This is a multi-part message in MIME format. --------------080300030901090506030508 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello list, (cross posted to mapserver-users and postgis-users) I have a postGIS table that contains cities. I am trying to get this running through mapserver WFS. Mapserver WFS doesn't generate errors, but returns no data at all. A postgres getsrid tells me the srid is 4326, which is also in my geometry_columns qGIS shows the postGIS table direct from the database without problems. http://82.176.214.209/cgi-bin/mapserv.exe?map=/ms4w/apps/mappingworlds/s ervice/wfs.map&service=WFS&REQUEST=getfeature&typename=worldcities_x&ver sion=1.0.0 What am I doing wrong? -- Milo van der Linden [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> http://www.3dsite.nl De informatie in dit bericht reflecteerd mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bijbehorende voorwaarden. --------------080300030901090506030508 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> </head> <body bgcolor="#ffffff" text="#000000"> <font face="Helvetica, Arial, sans-serif">Hello list,<br> <br> (cross posted to mapserver-users and postgis-users)<br> <br> I have a postGIS table that contains cities. I am trying to get this running through mapserver WFS.<br> <br> Mapserver WFS doesn't generate errors, but returns no data at all.<br> <br> A postgres getsrid tells me the srid is 4326, which is also in my geometry_columns<br> qGIS shows the postGIS table direct from the database without problems.<br> <br> <a class="moz-txt-link-freetext" href="http://82.176.214.209/cgi-bin/mapserv.exe?map=/ms4w/apps/mappingwo rlds/service/wfs.map&service=WFS&REQUEST=getfeature&typename=worldcities _x&version=1.0.0">http://82.176.214.209/cgi-bin/mapserv.exe?map=/ms4w/ap ps/mappingworlds/service/wfs.map&service=WFS&REQUEST=getfeature& amp;typename=worldcities_x&version=1.0.0</a><br> <br> What am I doing wrong?<br> </font> <div class="moz-signature">-- <br> <title>3DSite</title> <meta http-equiv="Content-Type" content="text/html; "> <style type="text/css"> <!-- body { background-color: #FFFFFF; margin-left: 5px; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; } body,td,th { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333; } .style4 {font-size: 9px; } .style5 {font-size: 9px; color: #CCCCCC; } --> </style> <meta content="MSHTML 6.00.2900.2912" name="GENERATOR"> <br> <table border="0" cellpadding="0" cellspacing="0" width="400"> <tbody> <tr> <td rowspan="3" align="left" height="0" valign="bottom" width="15"><br> </td> <td colspan="2" align="left" height="78" valign="top" width="0"> <p class="style4">Milo van der Linden <br> <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a><br> <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>< br> <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a><br> <a href="http://www.3dsite.nl">http://www.3dsite.nl</a><br> </p> </td> <td rowspan="3" align="left" height="0" valign="top" width="15"> </td> <td valign="top" width="300"> <p class="style5"><span lang="NL">De informatie in dit bericht reflecteerd mijn persoonlijke mening en niet die van een bedrijf of instantie. Aan de informatie kunnen geen rechten worden ontleend. Indien dit bericht onderdeel is van een forum, mailing-list of community dan gelden automatisch de bijbehorende voorwaarden.</span></p> </td> </tr> </tbody> </table> </div> </body> </html> --------------080300030901090506030508-- ------------------------------ Date: Thu, 2 Aug 2007 15:33:48 -0500 From: David Niergarth <[EMAIL PROTECTED]> Subject: mapscript layer.setFilter() Hello, I have a Python mapscript layer that works fine under mapserver 4.8.3 (Ubuntu Edgy w/ postgresql 8.1) but fails under mapserver 4.10.0 (Ubuntu Feisty w/ postgresql 8.2). The problem happens when trying to set a filter on a layer. layer_obj.data = "the_geom from tbl_people_points" layer_obj.setFilter( "idpeople in (select idpeople from tbl_request_%s) and quality=0" % idrequest ) Under 4.8.3, the subquery in the filter works just fine. Under 4.10.0, however, the filter string is ending up truncated as 'idpeople in '. Here's are a couple simple filters that still work under 4.10: layer_obj.setFilter("idpeople = 10") layer_obj.setFilter("idpeople = 10 or idpeople = 4") And here are a couple simple queries that get truncated under 4.10: layer_obj.setFilter("idpeople <= 10") # For this query, layer.getFilterString() returns 'idpeople '. layer_obj.setFilter("idpeople = 10 or (idpeople = 10)") # For this query, layer.getFilterString() returns 'idpeople = 10 or ') All the queries above work under 4.8. The truncation in 4.10 leads to an obvious SQL syntax error, which is the error I'm seeing reported by Python mapscript. Oddly, I'm not seeing these queries show up in my postgres log -- but maybe that's a log-level thing. Does anyone know what might have changed between 4.8 and 4.10? Or is this perhaps a bug in 4.10? Thanks for any ideas, --David # Add people_points layer. layer_obj = mapscript.layerObj(map_obj) layer_obj.connectiontype = mapscript.MS_POSTGIS layer_obj.name = 'people_points' layer_obj.connection = "user=pgsql host=%s dbname=%s port=%s" % ( host, dbname, port) layer_obj.data = "the_geom from tbl_people_points" layer_obj.setFilter( "idpeople in (select idpeople from tbl_request_%s) and quality=0" % idrequest ) layer_obj.status = mapscript.MS_ON layer_obj.type = mapscript.MS_LAYER_POINT layer_obj.transparency = 50 c = mapscript.classObj(layer_obj) c.name = 'Members' s = mapscript.styleObj(c) s.color = mapscript.colorObj(255, 0, 0) s.outlinecolor = mapscript.colorObj(255, 0, 0) s.symbol = map_obj.symbolset.index('circle') s.size = 8 ------------------------------ Date: Thu, 2 Aug 2007 17:09:03 -0500 From: Steven Monai <[EMAIL PROTECTED]> Subject: PHP/MapScript on Debian and Ubuntu Hello, all (but especially the PHP/MapScript devs): Before I go to the trouble of trying to contact the Debian package maintainers, I'm posting my question here first, just in case someone in = the Mapserver community has any information.=20 Everything I've seen on this list over the past few years has indicated t= hat the best way to run PHP/MapScript is in CGI mode. Yet the Debian package maintainers seem to be under the impression that PHP/MapScript is most stable running in an Apache2 DSO, even going so far as to patch PHP/MapScript so that it refuses to run in a CGI (or even a CLI) environment. Does anyone have any idea why Debian's 'php5-mapscript' pack= age maintainers have done this? Do they know something that I/we don't? Is PHP/MapScript not stable in PHP5 when run as CGI/CLI? I really would like to be able to run ka-map's 'precache2.php' script fro= m the command line in Debian (or Ubuntu) without having to compile my own php_mapscript.so. Regards, -SM -- ------------------------------ Date: Thu, 2 Aug 2007 20:09:31 -0400 From: Stephen Woodbridge <[EMAIL PROTECTED]> Subject: Re: PHP/MapScript on Debian and Ubuntu Steven Monai wrote: > Hello, all (but especially the PHP/MapScript devs): > > Before I go to the trouble of trying to contact the Debian package > maintainers, I'm posting my question here first, just in case someone > in the Mapserver community has any information. > > Everything I've seen on this list over the past few years has > indicated that the best way to run PHP/MapScript is in CGI mode. Yet > the Debian package maintainers seem to be under the impression that > PHP/MapScript is most stable running in an Apache2 DSO, even going so > far as to patch PHP/MapScript so that it refuses to run in a CGI (or > even a CLI) environment. Does anyone have any idea why Debian's > 'php5-mapscript' package maintainers have done this? Do they know > something that I/we don't? Is PHP/MapScript not stable in PHP5 when run as CGI/CLI? > > I really would like to be able to run ka-map's 'precache2.php' script > from the command line in Debian (or Ubuntu) without having to compile > my own php_mapscript.so. > > Regards, > -SM > -- I can not help you much with the Debian question, but I do know that precache2.php has a memory leak on 4.10. As can bee seen here: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 16754 swoodbri 25 0 4707m 4.5g 6604 R 99 57.5 10945:39 php 26651 swoodbri 25 0 601m 483m 6540 R 98 6.1 3444:00 php These two processes started out around 91M or less. I estimate that they are leaking in the ball park of about 6M per metatile. I have not had a chance to try and run this under the current trunk. If I do get a chance to build and test that I will run it under valgrind and file a ticket on it in needed. This is running on Suse and is running from the CLI on PHP5. I have already discussed this with Daniel off list. -Steve W ------------------------------ End of MAPSERVER-USERS Digest - 1 Aug 2007 to 2 Aug 2007 (#2007-210) ********************************************************************
