From Tom.Kralidis at EC.GC.CA Tue Feb 1 08:41:10 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: WMS GetCapabilities Attribution element Message-ID: Hi, The WMS spec (1.1.0 AND 1.1.1, basically anything 1.0.7 and greater) allows for, within the Layer element, the following element to be defined: State College University image/gif (for more information, see http://www.opengeospatial.org/docs/01-068r3.pdf, section 7.1.4.5.11) Currently, MapServer supports the all of the above mappings at the MAP/WEB/METADATA level: [ows_contactorganization] [wms_logourl_format] (note: wms_logourl_* is part of the WMC spec, but we could use it since it's already defined). Since the metadata is already defined, we could put this in mapwms.c for 1.0.7+ requests, inserting the Attribution element as per above in the root layer element of the Capabilities XML response. The element would go between the Extent and MetadataURL elements (there's other in between, but Extent and MetadataURL are what MapServer support). Why? More metadata in WMS Capabilities. And a LogoURL image is really nice in the context of portals and services discovery. Comments? -- I can put this in Bugzilla if there is interest and intent on adding this. Thanks ..Tom From steve.lime at DNR.STATE.MN.US Tue Feb 1 10:34:42 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue Message-ID: Have you tried these queries outside of the WFS context? That is, straight MapServer? Or even straight Oracle Spatial. It'd be helpful to get as many layers as possible out of the way. Steve >>> Arnulf Christl 02/01/05 9:24 AM >>> > Attribute queries *should* use the underlying RDMS system so it's not > MapServer per se that loops through records excepting in the case of > shapefiles. With a shapefile I could understand why it would be slow. [...] Hi, I disagree with it being a database problem - but without fully understanding it the probability is high that you are right again... I repost this report on our troubles with the WFS implementation in the hope that Fernando has an idea. >>>>Arnulf Christl 01/30/05 1:34 PM >>> [...] We have developed a performance problem using MapServer as WFS. The problem is not caused by the spatial access which is great and fast as ever but (we suspect) because of how MapServer implements a query based on a feature attribute search. Would be great if somebody could verify my gut instinct on this. [it feels a little like a follow up on a getFeatureInfo Request problem we reported. MapServer first requests for for the ids, then for the rest]. Data The database consists of 6.5 million land lots. Each can be found by querying for 4 hierarchically distributed integers, similar to state, province, county, address... Each has a unique oid "GEO_ID_". Some land lots are only identified by three of those identifiers, the fourth being Null. All of this has been accounted for when setting up and indexing the database. The database has been tuned heavily, several other applications run fine with it. The database fields concerned are indexed in the order of relevance, the connection string in the MAP file also respects this order. What we need to do is navigate on the attribute data using MapServer as WFS. That way we do not access the WFS with a spatial BBox but only with attributes. Database We have run it with Oracle using thin OGR and thick oraclespatial and also with PostgreSQL/PostGIS (some might have seen several posts to the user list where we still thought that we did something wrong in the connection string). Request this WFS is requested like below, but usually with all four filter parameters (only two in this example). map=alk_wfs_jl.map &REQUEST=GetFeature &VERSION=1.0.0 &SERVICE=WFS &TYPENAME=flurst &FILTER= GMNR 3704 FLNR 7 We compiled MapServer with debug option and a patched maporaclespatial.c that spills the SQLs to the command line. Here they are: [Tue Jan 25 20:55:53 2005].940125 msOracleSpatialLayerWhichShapes: SQL statement is SELECT GEO_ID_, GMNR, GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) WHERE SDO_FILTER( GEO_COORD_, MDSYS.SDO_GEOMETRY(2003, 82027, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(3435500,5509500,3436500,5510000) ),'querytype=window') = 'TRUE' [Tue Jan 25 20:55:54 2005].812235 msOracleSpatialLayerWhichShapes: SQL statement is SELECT GEO_ID_, FLNR, GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) WHERE SDO_FILTER( GEO_COORD_, MDSYS.SDO_GEOMETRY(2003, 82027, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(3435500,5509500,3436500,5510000) ),'querytype=window') = 'TRUE' MapServer seems to consecutively make full table scans for each parameter. The only spatial restriction obviously being what has been set in the MAP file extent parameter - as this kind of request does not have a spatial component. Having finished this MapServer would like to retrieve the requested information by querying the result set with the initial SELECT statement. We simulated this by calling: mapserv441-debug "QUERY_STRING=map=alk_wfs_jl.map&REQUEST=GetFeature&VERSION=1.0.0&SERVICE=WFS&TYPENAME=flurst&FILTER=GMNR99999" The result is: [Tue Jan 25 20:59:07 2005].331593 msOracleSpatialLayerOpen called with: GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) USING UNIQUE GEO_ID_ SRID 82027 [Tue Jan 25 20:59:08 2005].31715 msOracleSpatialLayerOpen. Shared connection not available. Creating one. [Tue Jan 25 20:59:08 2005].31759 msConnPoolRegister(flurst,***/*********@***,0x8136908) [Tue Jan 25 20:59:08 2005].50329 msOracleSpatialLayerFreeItemInfo was called. [Tue Jan 25 20:59:08 2005].50378 msOracleSpatialLayerInitItemInfo was called. [Tue Jan 25 20:59:08 2005].50421 msOracleSpatialLayerWhichShapes was called. [Tue Jan 25 20:59:08 2005].50533 msOracleSpatialLayerWhichShapes: SQL statement is SELECT GEO_ID_, GMNR, GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) WHERE SDO_FILTER( GEO_COORD_, MDSYS.SDO_GEOMETRY(2003, 82027, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(3435500,5509500,3436500,5510000) ),'querytype=window') = 'TRUE' [Tue Jan 25 20:59:08 2005].328734 msOracleSpatialLayerFreeItemInfo was called. [Tue Jan 25 20:59:08 2005].328790 msOracleSpatialLayerClose was called. Layer connection: ***/*********@*** [Tue Jan 25 20:59:08 2005].328816 msOracleSpatialLayerClose. Cleaning layerinfo handlers. [Tue Jan 25 20:59:08 2005].329023 msOracleSpatialLayerClose. Cleaning Oracle handlers. [Tue Jan 25 20:59:08 2005].329046 msConnPoolRelease(flurst,***/*********@***,0x8136908) [Tue Jan 25 20:59:08 2005].329072 msConnPoolClose(***/*********@***,0x8136908) [Tue Jan 25 20:59:08 2005].374601 msOracleSpatialLayerOpen called with: GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) USING UNIQUE GEO_ID_ SRID 82027 [Tue Jan 25 20:59:08 2005].573113 msOracleSpatialLayerOpen. Shared connection not available. Creating one. [Tue Jan 25 20:59:08 2005].573152 msConnPoolRegister(flurst,***/*********@***,0x81a2910) [Tue Jan 25 20:59:08 2005].583712 msOracleSpatialLayerFreeItemInfo was called. [Tue Jan 25 20:59:08 2005].583752 msOracleSpatialLayerInitItemInfo was called. [Tue Jan 25 20:59:08 2005].583777 msOracleSpatialLayerGetShape was called. Using the record = 4393231. [Tue Jan 25 20:59:08 2005].583815 msOracleSpatialLayerGetShape. Sql: SELECT GMNR, GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) WHERE GEO_ID_ = 4393231 MapServer dies with a seg fault here, we didn't find out why. As we are deep into the project already we have to decide now whether to switch to GeoServer for this particular question (not knowing whether it will work there either :-) or wait for MapServer to somehow get the request done correctly. --- Never tired of a workaround we temporarily do it with a standard MapServer request with DUMP=True and the request FILTER parameters as [variables-] in the MAP file. This is far from being OGC WFS but it works fine. For some reason this currently will only work with OGR, we are still debugging thick oraclespatial. --- Best, Arnulf. -- ------------------------ Arnulf B. Christl ------------------------ http://www.ccgis.org http://www.mapbender.org ------------------------ From steve.lime at DNR.STATE.MN.US Tue Feb 1 11:50:51 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:42 2008 Subject: Is the MapServer code supposed to be ANSI C? Message-ID: Hi Petter: Certainly intended to send to the whole list, slip of the mouse (CC'ing now). After doing a bit of reading after your initial posting I agree that that ANSI C C89 makes the most logical target at this point in time. Steve >>> Petter Reinholdtsen 01/31/05 4:23 PM >>> [Steve Lime] > Petter: A target has never really been discussed. I think many > developers took some of their cues (stylewise) from my original > code, which in some places may be 7 or 8 years old (not too much of > that left, but there is some). I shot for ANSI C but never > explicitly set that as a design goal. Well, unless one agrees on the specification, it is hard to know if the code is correct or not. Given a specification, one can decide if the code or the compiler behaves correctly. Without a specification, it is much harder. And the question about C89 or C99 have practical implications. Should code like this be allowed: int foo; // C99 comment, illegal in C89. char a[foo]; /* varsize array, illegal in C89 */ char c = -1; /* C89 allow both signed and unsigned char type */ if (c > 0) /* undefined behavior for C89, well defined for C99 */ printf("negative c\n"); Because of these and other issues, I would prefer to know if the code is supposed to be ANSI C or not, and if it is supposed to be ANSI C, which version of ANSI C it is supposed to be using. I would prefer the code to follow ANSI C using the C89 specification, because several of the compilers I am using are not able to handle the C99 specification yet. (Btw, why did you send your answer only to me? I'm happy to discuss this on the public list. :) From Tom.Kralidis at EC.GC.CA Tue Feb 1 12:00:53 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: Is the MapServer code supposed to be ANSI C? Message-ID: Agreed. We might want to add -ansi -pedantic to our compile settings in Makefile as well. ..Tom > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Steve Lime > Sent: Tuesday, 01 February, 2005 11:51 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] Is the MapServer code > supposed to be ANSI C? > > > Hi Petter: Certainly intended to send to the whole list, slip > of the mouse (CC'ing now). After doing a bit of reading after > your initial posting I agree that that ANSI C C89 makes the > most logical target at this point in time. > > Steve > > >>> Petter Reinholdtsen 01/31/05 4:23 PM >>> > > [Steve Lime] > > Petter: A target has never really been discussed. I think many > > developers took some of their cues (stylewise) from my > original code, > > which in some places may be 7 or 8 years old (not too much of that > > left, but there is some). I shot for ANSI C but never > explicitly set > > that as a design goal. > > Well, unless one agrees on the specification, it is hard to > know if the code is correct or not. Given a specification, > one can decide if the code or the compiler behaves correctly. > Without a specification, it is much harder. > > And the question about C89 or C99 have practical > implications. Should code like this be allowed: > > int foo; // C99 comment, illegal in C89. > char a[foo]; /* varsize array, illegal in C89 */ > char c = -1; /* C89 allow both signed and unsigned char type */ > if (c > 0) /* undefined behavior for C89, well defined for C99 */ > printf("negative c\n"); > > Because of these and other issues, I would prefer to know if > the code is supposed to be ANSI C or not, and if it is > supposed to be ANSI C, which version of ANSI C it is supposed > to be using. > > I would prefer the code to follow ANSI C using the C89 > specification, because several of the compilers I am using > are not able to handle the C99 specification yet. > > (Btw, why did you send your answer only to me? I'm happy to > discuss this on the public list. :) > From fsimon at UNIVALI.BR Tue Feb 1 10:27:57 2005 From: fsimon at UNIVALI.BR (Fernando S.) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue In-Reply-To: Message-ID: Hi folks, WFS problem can occur with Oracle Spatial layers because the function getextent for maporaclespatial.c was not implemented yet, I'm implementing now. This bugs: #1109, #1110 and #1111 show this. About the segmentation fault in OracleSpatialGetShape function I never saw this problem, I will try to find the solution, can be in OracleSpatialLayerFreeItemInfo I will check. For OracleSpatialWhichShapes function I don't see any other way to restrict the query, I used the extent (rectObj) of currently view (not for the fixed map extent) to try find the best performance. Thanks. Fernando Simon Steve Lime wrote: >Have you tried these queries outside of the WFS context? That is, >straight MapServer? Or even straight Oracle Spatial. It'd be helpful to >get as many layers as possible out of the way. > >Steve > > > >>>>Arnulf Christl 02/01/05 9:24 AM >>> >>>> >>>> > > > >>Attribute queries *should* use the underlying RDMS system so it's not >>MapServer per se that loops through records excepting in the case of >>shapefiles. With a shapefile I could understand why it would be slow. >> >> >[...] > >Hi, >I disagree with it being a database problem - but without fully >understanding it the probability is high that you are right again... > >I repost this report on our troubles with the WFS implementation in the >hope that Fernando has an idea. > > > >>>>>Arnulf Christl 01/30/05 1:34 PM >>> >>>>> >>>>> >[...] >We have developed a performance problem using MapServer as WFS. The >problem is not caused by the spatial access which is great and fast as >ever but (we suspect) because of how MapServer implements a query based >on a feature attribute search. Would be great if somebody could verify >my gut instinct on this. >[it feels a little like a follow up on a getFeatureInfo Request problem >we reported. MapServer first requests for for the ids, then for the >rest]. > >Data >The database consists of 6.5 million land lots. Each can be found by >querying for 4 hierarchically distributed integers, similar to state, >province, county, address... Each has a unique oid "GEO_ID_". Some land >lots are only identified by three of those identifiers, the fourth being > >Null. All of this has been accounted for when setting up and indexing >the database. The database has been tuned heavily, several other >applications run fine with it. The database fields concerned are indexed > >in the order of relevance, the connection string in the MAP file also >respects this order. > >What we need to do is navigate on the attribute data using MapServer as >WFS. That way we do not access the WFS with a spatial BBox but only with > >attributes. > >Database >We have run it with Oracle using thin OGR and thick oraclespatial and >also with PostgreSQL/PostGIS (some might have seen several posts to the >user list where we still thought that we did something wrong in the >connection string). > >Request >this WFS is requested like below, but usually with all four filter >parameters (only two in this example). > >map=alk_wfs_jl.map >&REQUEST=GetFeature >&VERSION=1.0.0 >&SERVICE=WFS >&TYPENAME=flurst >&FILTER= > > > > GMNR > 3704 > > > FLNR > 7 > > > > >We compiled MapServer with debug option and a patched maporaclespatial.c > >that spills the SQLs to the command line. Here they are: > >[Tue Jan 25 20:55:53 2005].940125 msOracleSpatialLayerWhichShapes: SQL >statement is SELECT GEO_ID_, GMNR, GEO_COORD_ FROM (SELECT GEO_COORD_ , >GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) >WHERE SDO_FILTER( GEO_COORD_, MDSYS.SDO_GEOMETRY(2003, 82027, >NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(3435500,5509500,3436500,5510000) > >),'querytype=window') = 'TRUE' > >[Tue Jan 25 20:55:54 2005].812235 msOracleSpatialLayerWhichShapes: SQL >statement is SELECT GEO_ID_, FLNR, GEO_COORD_ FROM (SELECT GEO_COORD_ , >GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) >WHERE SDO_FILTER( GEO_COORD_, MDSYS.SDO_GEOMETRY(2003, 82027, >NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(3435500,5509500,3436500,5510000) > >),'querytype=window') = 'TRUE' > >MapServer seems to consecutively make full table scans for each >parameter. The only spatial restriction obviously being what has been >set in the MAP file extent parameter - as this kind of request does not >have a spatial component. > >Having finished this MapServer would like to retrieve the requested >information by querying the result set with the initial SELECT >statement. We simulated this by calling: > >mapserv441-debug >"QUERY_STRING=map=alk_wfs_jl.map&REQUEST=GetFeature&VERSION=1.0.0&SERVICE=WFS&TYPENAME=flurst&FILTER=GMNR99999" > >The result is: > >[Tue Jan 25 20:59:07 2005].331593 msOracleSpatialLayerOpen called with: >GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, FUNR, QUELLE, >GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) USING UNIQUE GEO_ID_ SRID 82027 > >[Tue Jan 25 20:59:08 2005].31715 msOracleSpatialLayerOpen. Shared >connection not available. Creating one. >[Tue Jan 25 20:59:08 2005].31759 >msConnPoolRegister(flurst,***/*********@***,0x8136908) >[Tue Jan 25 20:59:08 2005].50329 msOracleSpatialLayerFreeItemInfo was >called. >[Tue Jan 25 20:59:08 2005].50378 msOracleSpatialLayerInitItemInfo was >called. >[Tue Jan 25 20:59:08 2005].50421 msOracleSpatialLayerWhichShapes was >called. >[Tue Jan 25 20:59:08 2005].50533 msOracleSpatialLayerWhichShapes: SQL >statement is SELECT GEO_ID_, GMNR, GEO_COORD_ FROM (SELECT GEO_COORD_ , >GMNR, FLNR, FSNR, FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) >WHERE SDO_FILTER( GEO_COORD_, MDSYS.SDO_GEOMETRY(2003, 82027, >NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(3435500,5509500,3436500,5510000) > >),'querytype=window') = 'TRUE' > >[Tue Jan 25 20:59:08 2005].328734 msOracleSpatialLayerFreeItemInfo was >called. >[Tue Jan 25 20:59:08 2005].328790 msOracleSpatialLayerClose was called. >Layer connection: ***/*********@*** >[Tue Jan 25 20:59:08 2005].328816 msOracleSpatialLayerClose. Cleaning >layerinfo handlers. >[Tue Jan 25 20:59:08 2005].329023 msOracleSpatialLayerClose. Cleaning >Oracle handlers. >[Tue Jan 25 20:59:08 2005].329046 >msConnPoolRelease(flurst,***/*********@***,0x8136908) >[Tue Jan 25 20:59:08 2005].329072 >msConnPoolClose(***/*********@***,0x8136908) >[Tue Jan 25 20:59:08 2005].374601 msOracleSpatialLayerOpen called with: >GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, FUNR, QUELLE, >GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) USING UNIQUE GEO_ID_ SRID 82027 > >[Tue Jan 25 20:59:08 2005].573113 msOracleSpatialLayerOpen. Shared >connection not available. Creating one. >[Tue Jan 25 20:59:08 2005].573152 >msConnPoolRegister(flurst,***/*********@***,0x81a2910) >[Tue Jan 25 20:59:08 2005].583712 msOracleSpatialLayerFreeItemInfo was >called. >[Tue Jan 25 20:59:08 2005].583752 msOracleSpatialLayerInitItemInfo was >called. >[Tue Jan 25 20:59:08 2005].583777 msOracleSpatialLayerGetShape was >called. Using the record = 4393231. >[Tue Jan 25 20:59:08 2005].583815 msOracleSpatialLayerGetShape. Sql: >SELECT GMNR, GEO_COORD_ FROM (SELECT GEO_COORD_ , GMNR, FLNR, FSNR, >FUNR, QUELLE, GEO_ID_ FROM FLO.FLO_AL125_AGGREGA_VW) WHERE GEO_ID_ = >4393231 > >MapServer dies with a seg fault here, we didn't find out why. > >As we are deep into the project already we have to decide now whether to > >switch to GeoServer for this particular question (not knowing whether it > >will work there either :-) or wait for MapServer to somehow get the >request done correctly. > >--- >Never tired of a workaround we temporarily do it with a standard >MapServer request with DUMP=True and the request FILTER parameters as >[variables-] in the MAP file. This is far from being OGC WFS but it >works fine. For some reason this currently will only work with OGR, we >are still debugging thick oraclespatial. >--- > >Best, Arnulf. > > > From pere at HUNGRY.COM Tue Feb 1 12:27:45 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:42 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: <2576812186CDD411BF1500508B6DCE9508A7D962@ecnwri1.ontario.int.ec.gc.ca> Message-ID: [Kralidis,Tom] > Agreed. We might want to add -ansi -pedantic to our compile > settings in Makefile as well. Yes, that would be nice, and I agree completely. But there are some fixes left before the code will compile using those flags. :) From fwarmerdam at GMAIL.COM Tue Feb 1 13:11:08 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue In-Reply-To: Message-ID: > MapServer seems to consecutively make full table scans for each > parameter. The only spatial restriction obviously being what has been > set in the MAP file extent parameter - as this kind of request does not > have a spatial component. ... > Never tired of a workaround we temporarily do it with a standard > MapServer request with DUMP=True and the request FILTER parameters as > [variables-] in the MAP file. This is far from being OGC WFS but it > works fine. For some reason this currently will only work with OGR, we > are still debugging thick oraclespatial. Arnulf, I'm not sure I understand all the issues here. My understanding is that the MapServer WFS server is evaluating all the filter conditions by doing a pass through the complete dataset to produce a final list of matching ids, is that correct? Can anyone comment on whether the WFS filters are just turned into regular MapServer filters (as might have been set with the FILTER keyword on a layer)? If so, how does the WFS know which filter format to set as it differs by data provider (OGR, shapefile, OracleSpatial)? In MapServer 4.5 (possibly retrofit to 4.4.1?) I implemented support in the MapServer OGR link to pass FILTER requests through OGR and to the underlying driver in some situations. That means, in the case of OGR's OCI driver that the attribute query would be evaluated in one SELECT statement within Oracle which I think would resolve your performance problems. However, to enable this the FILTER needs to be prefixed by the WHERE keyword. Otherwise the filter is treated as being in the same syntax as the shapefile filters and is evaluated by MapServer with potentially terrible performance. To be honest, I am fuzzy on alot of how attribute queries are working in MapServer, and especially how WFS queries are handled so I may be out in left field. However, if the WFS code turns the WFS filter into a normal MapServer filter it may be easy to hack it so the filter can be passed through to OGR's low level driver. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From assefa at DMSOLUTIONS.CA Tue Feb 1 13:34:47 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue In-Reply-To: <931f8ea905020110115a51751e@mail.gmail.com> Message-ID: Just some info on how the WFS GetFeature with is done internally in mapserver : the part is transformed into mapserver class expressions and then a normal spatial query (querybyrect or querybypoint) is performed. If the is soemhow complex (ex It contains several spatial queries plus attribute queries), the is broken into several small pieces and then queries are done for each piece and the results are merged to provide the final set of results. Later, Frank Warmerdam wrote: >>MapServer seems to consecutively make full table scans for each >>parameter. The only spatial restriction obviously being what has been >>set in the MAP file extent parameter - as this kind of request does not >>have a spatial component. > > ... > >>Never tired of a workaround we temporarily do it with a standard >>MapServer request with DUMP=True and the request FILTER parameters as >>[variables-] in the MAP file. This is far from being OGC WFS but it >>works fine. For some reason this currently will only work with OGR, we >>are still debugging thick oraclespatial. > > > Arnulf, > > I'm not sure I understand all the issues here. My understanding is that > the MapServer WFS server is evaluating all the filter conditions by doing > a pass through the complete dataset to produce a final list of matching > ids, is that correct? > > Can anyone comment on whether the WFS filters are just turned into > regular MapServer filters (as might have been set with the FILTER > keyword on a layer)? If so, how does the WFS know which filter format > to set as it differs by data provider (OGR, shapefile, OracleSpatial)? > > In MapServer 4.5 (possibly retrofit to 4.4.1?) I implemented support > in the MapServer OGR link to pass FILTER requests through OGR > and to the underlying driver in some situations. That means, in the > case of OGR's OCI driver that the attribute query would be evaluated > in one SELECT statement within Oracle which I think would resolve > your performance problems. > > However, to enable this the FILTER needs to be prefixed by the > WHERE keyword. Otherwise the filter is treated as being in the > same syntax as the shapefile filters and is evaluated by MapServer > with potentially terrible performance. > > To be honest, I am fuzzy on alot of how attribute queries are working > in MapServer, and especially how WFS queries are handled so > I may be out in left field. > > However, if the WFS code turns the WFS filter into a normal MapServer > filter it may be easy to hack it so the filter can be passed through to > OGR's low level driver. > > Best regards, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From fwarmerdam at GMAIL.COM Tue Feb 1 13:47:17 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue In-Reply-To: <41FFCBC7.2030201@dmsolutions.ca> Message-ID: On Tue, 01 Feb 2005 13:34:47 -0500, Yewondwossen Assefa wrote: > Just some info on how the WFS GetFeature with is done > internally in mapserver : > the part is transformed into mapserver class expressions and > then a normal spatial query (querybyrect or querybypoint) is performed. Assefa, When you say it is turned into a mapserver class expression, where it is set? Is a CLASS setup on the layer with this as it's EXPRESSION? Does the WFS code then classify all features, and only return those matching this query class? Would it make sense to try and use the layer level filter? As implemented now, aren't we pretty much trapped into evaluating all features withi mapserver instead of allowing underlying RDBMS's to do the attribute searches quickly? Is this how we will be leaving things indefinately? I am concerned that it is very hard for folks with large datasets in a database to take advantage of some of MapServers features efficiently when we just fallback to reading everything and evaluating alots of stuff in MapServer. > If the is soemhow complex (ex It contains several spatial > queries plus attribute queries), the is broken into several > small pieces and then queries are done for each piece and the results > are merged to provide the final set of results. Whew, that must have been a bit of work. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From bartvde at XS4ALL.NL Tue Feb 1 14:57:15 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri Feb 8 14:55:42 2008 Subject: named classes/named classifications In-Reply-To: <6052712907.20050114003759@home.nl> Message-ID: Hey Huub, maybe I am the only one understanding your mail :), since you did not get any reply as yet .... I opened up an enhancement bug for this in 2004: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=812 Maybe it only needs some funding to get implemented .... the idea is good I guess .... Best regards, Bart On Fri, 14 Jan 2005 00:37:59 +0100, huub fleuren wrote: > Hello developers, > > Soon, for a project we will have to create a MAP file containing some > 65 layers that will share a unique count of about 90 different classes. > > Of course it wil be no problem to generate all the classes for all the > layers again and again but allthough it is not ready yet i know it wil > be a Super MAP file. > > > i think i read a contribution somewhere where someone said that named > classes would become available in a future version of mapserv. > > CLASS > EXPRESSION > STYLE > ... > END > END > CLASS > EXPRESSION > STYLE > ... > END > END > CLASS > EXPRESSION > STYLE > ... > END > END > CLASS > EXPRESSION > STYLE > ... > END > END > CLASS > EXPRESSION > STYLE > ... > END > END > > would then read > > CLASSIFICATION > NAME 'wonen' > END > > This name would of course be reusable > > > In the first lines of the mapfile it would read > classifications 'classification\wonen.map classification\werken.map > classification\natuur.map classification\water.map ' > > the names defined in any classification map file is a complete > classification > > simply: you could reuse a classification containing classes > > any class could also have a (unique) name > In the first lines of the mapfile it would read > classes 'classification\allsingleclases.map > You could use > CLASS > NAME '30_1' > END > CLASS > NAME '30_2' > END > CLASS > NAME '30_3' > END > > > how do you look at this issue an when will something like it be > available? > > > > -- > Regards, > Huub > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From hfl at HOME.NL Tue Feb 1 15:05:12 2005 From: hfl at HOME.NL (huub fleuren) Date: Fri Feb 8 14:55:42 2008 Subject: named classes/named classifications In-Reply-To: Message-ID: Hallo Bart, You really think it's so vague? maybe i should have downsized it a little. >> simply: you could reuse a classification file we might be able to get some customer to fund it... it's not reaaly a bug of course, and even though the mapfile would be big, i would need and create a tool to manage it Regards. Huub Tuesday, February 1, 2005, 8:57:15 PM, you wrote: BvdE> Hey Huub, BvdE> maybe I am the only one understanding your mail :), since you did not get BvdE> any reply as yet .... BvdE> I opened up an enhancement bug for this in 2004: BvdE> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=812 BvdE> Maybe it only needs some funding to get implemented .... the idea is good BvdE> I guess .... BvdE> Best regards, BvdE> Bart BvdE> On Fri, 14 Jan 2005 00:37:59 +0100, huub fleuren wrote: >> Hello developers, >> >> Soon, for a project we will have to create a MAP file containing some >> 65 layers that will share a unique count of about 90 different classes. >> >> Of course it wil be no problem to generate all the classes for all the >> layers again and again but allthough it is not ready yet i know it wil >> be a Super MAP file. >> >> >> i think i read a contribution somewhere where someone said that named >> classes would become available in a future version of mapserv. >> >> CLASS >> EXPRESSION >> STYLE >> ... >> END >> END >> CLASS >> EXPRESSION >> STYLE >> ... >> END >> END >> CLASS >> EXPRESSION >> STYLE >> ... >> END >> END >> CLASS >> EXPRESSION >> STYLE >> ... >> END >> END >> CLASS >> EXPRESSION >> STYLE >> ... >> END >> END >> >> would then read >> >> CLASSIFICATION >> NAME 'wonen' >> END >> >> This name would of course be reusable >> >> >> In the first lines of the mapfile it would read >> classifications 'classification\wonen.map classification\werken.map >> classification\natuur.map classification\water.map ' >> >> the names defined in any classification map file is a complete >> classification >> >> simply: you could reuse a classification containing classes >> >> any class could also have a (unique) name >> In the first lines of the mapfile it would read >> classes 'classification\allsingleclases.map >> You could use >> CLASS >> NAME '30_1' >> END >> CLASS >> NAME '30_2' >> END >> CLASS >> NAME '30_3' >> END >> >> >> how do you look at this issue an when will something like it be >> available? >> >> >> >> -- >> Regards, >> Huub >> -- huub From assefa at DMSOLUTIONS.CA Tue Feb 1 15:11:39 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue In-Reply-To: <931f8ea905020110473b0f0f92@mail.gmail.com> Message-ID: Frank Warmerdam wrote: > On Tue, 01 Feb 2005 13:34:47 -0500, Yewondwossen Assefa > wrote: > >>Just some info on how the WFS GetFeature with is done >>internally in mapserver : >> the part is transformed into mapserver class expressions and >>then a normal spatial query (querybyrect or querybypoint) is performed. > > > Assefa, > > When you say it is turned into a mapserver class expression, where > it is set? Is a CLASS setup on the layer with this as it's EXPRESSION? > Does the WFS code then classify all features, and only return those > matching this query class? > Yes : I meant the class's object expression is the one used. Once the class expression's are set, a regular mapserver spatial query is called. Inside the query code there is a checking performed to see if a "candidate" feature (element inside the spatial query) meets one of the classe's expressions and if that is the case, this element is selected. The WFS code will then output the selected features. > Would it make sense to try and use the layer level filter? > > As implemented now, aren't we pretty much trapped into evaluating > all features withi mapserver instead of allowing underlying RDBMS's > to do the attribute searches quickly? Is this how we will be leaving > things indefinately? > > I am concerned that it is very hard for folks with large datasets in > a database to take advantage of some of MapServers features > efficiently when we just fallback to reading everything and evaluating > alots of stuff in MapServer. > I understand your concern. Using the layer filter would be appropriate but custum code would be necessary for diffrent type of drivers. I am willing to rework the WFS part of the code if peopole are willing to proivide help in testing the diffrent formats ( I do not have access to Oracle or even PostGIS locally so testing will be a bit difficult). I think, we should maybe move this discussion to a bug and work the details through it. > >>If the is soemhow complex (ex It contains several spatial >>queries plus attribute queries), the is broken into several >>small pieces and then queries are done for each piece and the results >>are merged to provide the final set of results. > > > Whew, that must have been a bit of work. > > Best regards, -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From warmerdam at POBOX.COM Tue Feb 1 17:10:18 2005 From: warmerdam at POBOX.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:42 2008 Subject: non-spatial query optimization Message-ID: Folks, Paul Ramsey pointed out that the current msSHPWhichShapes() function requires a search rectangle. This means that any sort of query against a feature datasource in MapServer ends up having a bounding rectangle whether it is needed or not. This can result in substantial complication and extra cost in the underlying datastores to apply the spatial filter. For instance, in an RDBMS it results in a much more complex query that may end up being optimized poorly. In OGR having a spatial filter often screws up optimizations in the underlying datasources as well. I propose to change msSHPWhichShapes() to take a pointer to a rectObj, instead of passing in a rectObj by value. If the pointer is NULL it will be interpreted as meaning there is no spatial component to be tested. All the feature store providers will need to be updated accordingly, which I am willing to do for the more straight forward ones (ie. Shapefiles, OGR, PostGIS). The other provider maintainer would need to implement this themselves, though I would make a first pass through making the code return an error if a NULL rect was passed into these providers. Are there any objections to me making such a change in MapServer 4.5? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From pere at HUNGRY.COM Tue Feb 1 17:26:58 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:42 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: <20050201172745.GA12893@saruman.uio.no> Message-ID: [Petter Reinholdtsen] > Yes, that would be nice, and I agree completely. But there are some > fixes left before the code will compile using those flags. :) Here is a start, getting rid of '//' comments in the header files, and also adding info about which #ifdef an #endif matches. There are several issues left before the code will compile with -ansi and -pedantic, and I'm not sure if using both is possible to reach with the mapserver code. But if we succeed, the code will most likely compile and work with any ANSI C89 compiler. Index: cgiutil.h =================================================================== RCS file: /data2/cvsroot/mapserver/cgiutil.h,v retrieving revision 1.15 diff -u -3 -p -u -r1.15 cgiutil.h --- cgiutil.h 21 Oct 2004 04:30:54 -0000 1.15 +++ cgiutil.h 1 Feb 2005 22:16:06 -0000 @@ -49,7 +49,7 @@ enum MS_REQUEST_TYPE {MS_GET_REQUEST, MS_POST_REQUEST}; -//structure to hold request information +/* structure to hold request information */ typedef struct { #ifndef SWIG Index: map.h =================================================================== RCS file: /data2/cvsroot/mapserver/map.h,v retrieving revision 1.391 diff -u -3 -p -u -r1.391 map.h --- map.h 28 Jan 2005 06:16:53 -0000 1.391 +++ map.h 1 Feb 2005 22:16:09 -0000 @@ -185,7 +192,7 @@ static char *cvsid_aw(void) { return( cv #include "mapprimitive.h" #include "mapshape.h" #include "mapsymbol.h" -#include "maptree.h" // quadtree spatial index +#include "maptree.h" /* quadtree spatial index */ #include "maphash.h" #include "mapio.h" @@ -230,7 +237,7 @@ static char *cvsid_aw(void) { return( cv extern "C" { #endif -// General defines, wrapable +/* General defines, wrapable */ #define MS_VERSION "4.5" @@ -247,11 +254,11 @@ extern "C" { #define MS_SINGLE 0 /* modes for searching (spatial/database) */ #define MS_MULTIPLE 1 -// For layer transparency, allows alpha transparent pixmaps to be used -// with RGB map images +/* For layer transparency, allows alpha transparent pixmaps to be used + with RGB map images */ #define MS_GD_ALPHA 1000 -// General defines, not wrapable +/* General defines, not wrapable */ #ifndef SWIG #define MS_DEFAULT_MAPFILE_PATTERN "\\.map$" #define MS_TEMPLATE_EXPR "\\.(jsp|asp|cfm|xml|wml|html|htm|shtml|phtml|php|svg)$" @@ -282,10 +289,10 @@ extern "C" { #define MS_ITEMNAMELEN 32 #define MS_NAMELEN 20 -#define MS_MINSYMBOLSIZE 1 // in pixels +#define MS_MINSYMBOLSIZE 1 /* in pixels */ #define MS_MAXSYMBOLSIZE 500 -#define MS_MINSYMBOLWIDTH 1 // in pixels +#define MS_MINSYMBOLWIDTH 1 /* in pixels */ #define MS_MAXSYMBOLWIDTH 32 #define MS_URL 0 /* template types */ @@ -309,7 +316,7 @@ extern "C" { #define MS_NUMBER 2003 #define MS_COMMENT 2004 -// General macro definitions +/* General macro definitions */ #define MS_MIN(a,b) (((a)<(b))?(a):(b)) #define MS_MAX(a,b) (((a)>(b))?(a):(b)) #define MS_ABS(a) (((a)<0) ? -(a) : (a)) @@ -319,7 +326,7 @@ extern "C" { #define MS_PEN_TRANSPARENT -1 #define MS_PEN_UNSET -4 -//#define MS_VALID_EXTENT(minx, miny, maxx, maxy) (((minxrenderer == MS_RENDER_WITH_PDF) #define MS_RENDERER_IMAGEMAP(format) ((format)->renderer == MS_RENDER_WITH_IMAGEMAP) -// ok, we'll switch to an UL cell model to make this work with WMS +/* ok, we'll switch to an UL cell model to make this work with WMS */ #define MS_CELLSIZE(min,max,d) ((max - min)/d) #define MS_MAP2IMAGE_X(x,minx,cx) (MS_NINT((x - minx)/cx)) #define MS_MAP2IMAGE_Y(y,maxy,cy) (MS_NINT((maxy - y)/cy)) #define MS_IMAGE2MAP_X(x,minx,cx) (minx + cx*x) #define MS_IMAGE2MAP_Y(y,maxy,cy) (maxy - cy*y) -// For maplabel and mappdf +/* For maplabel and mappdf */ #define LINE_VERT_THRESHOLD .17 // max absolute value of cos of line angle, the closer to zero the more vertical the line must be -// For CARTO symbols +/* For CARTO symbols */ #define MS_PI 3.14159265358979323846 #define MS_PI2 1.57079632679489661923 // (MS_PI / 2) #define MS_3PI2 4.71238898038468985769 // (3 * MS_PI2) @@ -366,13 +373,13 @@ extern "C" { #endif -// General enumerated types - needed by scripts +/* General enumerated types - needed by scripts */ enum MS_FILE_TYPE {MS_FILE_MAP, MS_FILE_SYMBOL}; enum MS_UNITS {MS_INCHES, MS_FEET, MS_MILES, MS_METERS, MS_KILOMETERS, MS_DD, MS_PIXELS}; enum MS_SHAPE_TYPE {MS_SHAPE_POINT, MS_SHAPE_LINE, MS_SHAPE_POLYGON, MS_SHAPE_NULL}; enum MS_LAYER_TYPE {MS_LAYER_POINT, MS_LAYER_LINE, MS_LAYER_POLYGON, MS_LAYER_RASTER, MS_LAYER_ANNOTATION, MS_LAYER_QUERY, MS_LAYER_CIRCLE, MS_LAYER_TILEINDEX}; enum MS_FONT_TYPE {MS_TRUETYPE, MS_BITMAP}; -enum MS_LABEL_POSITIONS {MS_UL, MS_LR, MS_UR, MS_LL, MS_CR, MS_CL, MS_UC, MS_LC, MS_CC, MS_AUTO, MS_XY}; // arrangement matters for auto placement, don't change it +enum MS_LABEL_POSITIONS {MS_UL, MS_LR, MS_UR, MS_LL, MS_CR, MS_CL, MS_UC, MS_LC, MS_CC, MS_AUTO, MS_XY}; /* arrangement matters for auto placement, don't change it */ enum MS_BITMAP_FONT_SIZES {MS_TINY , MS_SMALL, MS_MEDIUM, MS_LARGE, MS_GIANT}; enum MS_QUERYMAP_STYLES {MS_NORMAL, MS_HILITE, MS_SELECTED}; enum MS_CONNECTION_TYPE {MS_INLINE, MS_SHAPEFILE, MS_TILED_SHAPEFILE, MS_SDE, MS_OGR, MS_UNUSED_1, MS_POSTGIS, MS_WMS, MS_ORACLESPATIAL, MS_WFS, MS_GRATICULE, MS_MYGIS, MS_RASTER }; @@ -389,7 +396,7 @@ enum MS_IMAGEMODE { MS_IMAGEMODE_PC256, #define MS_FILE_DEFAULT MS_FILE_MAP -// FONTSET OBJECT - used to hold aliases for TRUETYPE fonts +/* FONTSET OBJECT - used to hold aliases for TRUETYPE fonts */ typedef struct { #ifdef SWIG %immutable; @@ -405,19 +412,19 @@ typedef struct { #endif } fontSetObj; -// FEATURE LIST OBJECT - for inline features, shape caches and queries +/* FEATURE LIST OBJECT - for inline features, shape caches and queries */ #ifndef SWIG typedef struct listNode { shapeObj shape; struct listNode *next; - struct listNode *tailifhead; // this is the tail node in the list, if this is the head element, otherwise NULL + struct listNode *tailifhead; /* this is the tail node in the list, if this is the head element, otherwise NULL */ } featureListNodeObj; typedef featureListNodeObj * featureListNodeObjPtr; #endif #ifndef SWIG -// PALETTE OBJECT - used to hold colors while a map file is read +/* PALETTE OBJECT - used to hold colors while a map file is read */ typedef struct { colorObj colors[MS_MAXCOLORS-1]; int colorvalue[MS_MAXCOLORS-1]; @@ -425,34 +432,34 @@ typedef struct { } paletteObj; #endif -// EXPRESSION OBJECT +/* EXPRESSION OBJECT */ #ifndef SWIG typedef struct { char *string; int type; - // logical expression options + /* logical expression options */ char **items; int *indexes; int numitems; - // regular expression options - regex_t regex; // compiled regular expression to be matched + /* regular expression options */ + regex_t regex; /* compiled regular expression to be matched */ int compiled; } expressionObj; #endif #ifndef SWIG -// JOIN OBJECT - simple way to access other XBase files, one-to-one or one-to-many supported +/* JOIN OBJECT - simple way to access other XBase files, one-to-one or one-to-many supported */ typedef struct { char *name; - char **items, **values; // items/values (process 1 record at a time) + char **items, **values; /* items/values (process 1 record at a time) */ int numitems; char *table; - char *from, *to; // item names + char *from, *to; /* item names */ - void *joininfo; // vendor specific (i.e. XBase, MySQL, etc.) stuff to allow for persistant access + void *joininfo; /* vendor specific (i.e. XBase, MySQL, etc.) stuff to allow for persistant access */ char *header, *footer; #ifndef __cplusplus @@ -467,27 +474,27 @@ typedef struct { } joinObj; #endif -// OUTPUT FORMAT OBJECT - see mapoutput.c for most related code. +/* OUTPUT FORMAT OBJECT - see mapoutput.c for most related code. */ typedef struct { char *name; char *mimetype; char *driver; char *extension; - int renderer; // MS_RENDER_WITH_* - int imagemode; // MS_IMAGEMODE_* value. + int renderer; /* MS_RENDER_WITH_* */ + int imagemode; /* MS_IMAGEMODE_* value. */ int transparent; int bands; int numformatoptions; char **formatoptions; int refcount; - int inmapfile; //boolean value for writing + int inmapfile; /* boolean value for writing */ } outputFormatObj; -// The following is used for "don't care" values in transparent, interlace and -// imagequality values. +/* The following is used for "don't care" values in transparent, interlace and + imagequality values. */ #define MS_NOOVERRIDE -1111 -// QUERY MAP OBJECT - used to visualize query results +/* QUERY MAP OBJECT - used to visualize query results */ typedef struct { int height, width; int status; @@ -495,7 +502,7 @@ typedef struct { colorObj color; } queryMapObj; -// LABEL OBJECT - parameters needed to annotate a layer, legend or scalebar +/* LABEL OBJECT - parameters needed to annotate a layer, legend or scalebar */ typedef struct { char *font; enum MS_FONT_TYPE type; @@ -517,7 +524,7 @@ typedef struct { int offsetx, offsety; double angle; - int autoangle; // true or false + int autoangle; /* true or false */ int buffer; /* space to reserve around a label */ @@ -526,17 +533,17 @@ typedef struct { char wrap; int minfeaturesize; /* minimum feature size (in pixels) to label */ - int autominfeaturesize; // true or false + int autominfeaturesize; /* true or false */ int mindistance; int partials; /* can labels run of an image */ - int force; // labels *must* be drawn + int force; /* labels *must* be drawn */ char *encoding; } labelObj; -// WEB OBJECT - holds parameters for a mapserver/mapscript interface +/* WEB OBJECT - holds parameters for a mapserver/mapscript interface */ typedef struct { char *log; char *imagepath, *imageurl; @@ -555,13 +562,13 @@ typedef struct { double minscale, maxscale; char *mintemplate, *maxtemplate; - char *queryformat; // what format is the query to be returned, given as a MIME type + char *queryformat; /* what format is the query to be returned, given as a MIME type */ hashTableObj metadata; } webObj; -// STYLE OBJECT - holds parameters for symbolization, multiple styles may be applied within a classObj +/* STYLE OBJECT - holds parameters for symbolization, multiple styles may be applied within a classObj */ typedef struct { colorObj color; colorObj backgroundcolor; @@ -576,17 +583,18 @@ typedef struct { int width; int minwidth, maxwidth; - int offsetx, offsety; // for shadows, hollow symbols, etc... + int offsetx, offsety; /* for shadows, hollow symbols, etc... */ - double angle; // for future use + double angle; /* for future use */ int antialias; #ifndef SWIG - // Whether the style is within a class MS_TRUE or MS_FALSE. - // If true, then memory deallocation is handled by the class - // if false, then memory deallocation must be handled by the - // application. + /* Whether the style is within a class MS_TRUE or MS_FALSE. + * If true, then memory deallocation is handled by the class + * if false, then memory deallocation must be handled by the + * application. + */ int isachild; #endif @@ -596,10 +604,10 @@ typedef struct { #endif } styleObj; -// CLASS OBJECT - basic symbolization and classification information +/* CLASS OBJECT - basic symbolization and classification information */ typedef struct class_obj{ #ifndef SWIG - expressionObj expression; // the expression to be matched + expressionObj expression; /* the expression to be matched */ #endif int status; @@ -612,18 +620,18 @@ typedef struct class_obj{ labelObj label; - char *name; // should be unique within a layer - char *title; // used for legend labeling + char *name; /* should be unique within a layer */ + char *title; /* used for legend labeling */ #ifndef SWIG expressionObj text; -#endif +#endif /* not SWIG */ #ifndef __cplusplus char *template; -#else +#else /* __cplusplus */ char *_template; -#endif +#endif /* __cplusplus */ int type; @@ -636,34 +644,34 @@ typedef struct class_obj{ char *keyimage; } classObj; -// LABELCACHE OBJECTS - structures to implement label caching and collision avoidance etc -// Note: These are scriptable, but are read only. +/* LABELCACHE OBJECTS - structures to implement label caching and collision avoidance etc + Note: These are scriptable, but are read only. */ #ifdef SWIG %immutable; -#endif +#endif /* SWIG */ typedef struct { char *text; double featuresize; - styleObj *styles; // copied from the classObj, only present if there is a marker to be drawn + styleObj *styles; /* copied from the classObj, only present if there is a marker to be drawn */ int numstyles; - labelObj label; // copied from the classObj + labelObj label; /* copied from the classObj */ - int layerindex; // indexes + int layerindex; /* indexes */ int classindex; int tileindex; int shapeindex; - pointObj point; // label point - shapeObj *poly; // label bounding box + pointObj point; /* label point */ + shapeObj *poly; /* label bounding box */ - int status; // has this label been drawn or not + int status; /* has this label been drawn or not */ } labelCacheMemberObj; typedef struct { - int id; // corresponding label - shapeObj *poly; // marker bounding box (POINT layers only) + int id; /* corresponding label */ + shapeObj *poly; /* marker bounding box (POINT layers only) */ } markerCacheMemberObj; typedef struct { @@ -682,7 +690,7 @@ typedef struct { } resultCacheMemberObj; #ifdef SWIG %mutable; -#endif +#endif /* SWIG */ typedef struct { @@ -690,40 +698,40 @@ typedef struct { #ifndef SWIG resultCacheMemberObj *results; int cachesize; -#endif +#endif /* not SWIG */ #ifdef SWIG %immutable; -#endif +#endif /* SWIG */ int numresults; rectObj bounds; #ifdef SWIG %mutable; -#endif +#endif /* SWIG */ } resultCacheObj; -// SYMBOLSET OBJECT +/* SYMBOLSET OBJECT */ typedef struct { char *filename; int imagecachesize; #ifdef SWIG %immutable; -#endif // SWIG +#endif /* SWIG */ int numsymbols; #ifdef SWIG %mutable; -#endif // SWIG +#endif /* SWIG */ symbolObj symbol[MS_MAXSYMBOLS]; #ifndef SWIG struct map_obj *map; - fontSetObj *fontset; // a pointer to the main mapObj version + fontSetObj *fontset; /* a pointer to the main mapObj version */ struct imageCacheObj *imagecache; -#endif // SWIG +#endif /* not SWIG */ } symbolSetObj; -// REFERENCE MAP OBJECT + /* REFERENCE MAP OBJECT */ typedef struct { rectObj extent; int height, width; @@ -739,7 +747,7 @@ typedef struct { struct map_obj *map; } referenceMapObj; -// SCALEBAR OBJECT +/* SCALEBAR OBJECT */ typedef struct { colorObj imagecolor; int height, width; @@ -750,35 +758,35 @@ typedef struct { colorObj backgroundcolor; colorObj outlinecolor; int units; - int status; // ON, OFF or EMBED - int position; // for embeded scalebars + int status; /* ON, OFF or EMBED */ + int position; /* for embeded scalebars */ #ifndef SWIG int transparent; int interlace; -#endif +#endif /* not SWIG */ int postlabelcache; } scalebarObj; -// LEGEND OBJECT +/* LEGEND OBJECT */ typedef struct { colorObj imagecolor; labelObj label; int keysizex, keysizey; int keyspacingx, keyspacingy; - colorObj outlinecolor; // Color of outline of box, -1 for no outline - int status; // ON, OFF or EMBED + colorObj outlinecolor; /* Color of outline of box, -1 for no outline */ + int status; /* ON, OFF or EMBED */ int height, width; - int position; // for embeded legends + int position; /* for embeded legends */ #ifndef SWIG int transparent; int interlace; -#endif +#endif /* not SWIG */ int postlabelcache; #ifndef __cplusplus char *template; -#else +#else /* __cplusplus */ char *_template; -#endif +#endif /* __cplusplus */ struct map_obj *map; } legendObj; @@ -808,146 +816,146 @@ typedef struct char *labelformat; } graticuleObj; -// LAYER OBJECT - basic unit of a map +/* LAYER OBJECT - basic unit of a map */ typedef struct layer_obj { - char *classitem; // .DBF item to be used for symbol lookup + char *classitem; /* .DBF item to be used for symbol lookup */ #ifndef SWIG int classitemindex; - resultCacheObj *resultcache; // holds the results of a query against this layer - int annotate; // boolean flag for annotation - double scalefactor; // computed, not set + resultCacheObj *resultcache; /* holds the results of a query against this layer */ + int annotate; /* boolean flag for annotation */ + double scalefactor; /* computed, not set */ #ifndef __cplusplus - classObj *class; // always at least 1 class -#else + classObj *class; /* always at least 1 class */ +#else /* __cplusplus */ classObj *_class; -#endif -#endif +#endif /* __cplusplus */ +#endif /* not SWIG */ #ifdef SWIG %immutable; -#endif +#endif /* SWIG */ int numclasses; int index; struct map_obj *map; #ifdef SWIG %mutable; -#endif +#endif /* SWIG */ - char *header, *footer; // only used with multi result queries + char *header, *footer; /* only used with multi result queries */ #ifndef __cplusplus - char *template; // global template, used across all classes -#else + char *template; /* global template, used across all classes */ +#else /* __cplusplus */ char *_template; -#endif +#endif /* __cplusplus */ - char *name; // should be unique - char *group; // shouldn't be unique it's supposed to be a group right? + char *name; /* should be unique */ + char *group; /* shouldn't be unique it's supposed to be a group right? */ - int status; // on or off - char *data; // filename, can be relative or full path + int status; /* on or off */ + char *data; /* filename, can be relative or full path */ enum MS_LAYER_TYPE type; - double tolerance; // search buffer for point and line queries (in toleranceunits) + double tolerance; /* search buffer for point and line queries (in toleranceunits) */ int toleranceunits; - double symbolscale; // scale at which symbols are default size + double symbolscale; /* scale at which symbols are default size */ double minscale, maxscale; double labelminscale, labelmaxscale; - int sizeunits; // applies to all classes + int sizeunits; /* applies to all classes */ int maxfeatures; - colorObj offsite; // transparent pixel value for raster images + colorObj offsite; /* transparent pixel value for raster images */ - int transform; // does this layer have to be transformed to file coordinates + int transform; /* does this layer have to be transformed to file coordinates */ - int labelcache, postlabelcache; // on or off + int labelcache, postlabelcache; /* on or off */ char *labelitem, *labelsizeitem, *labelangleitem; int labelitemindex, labelsizeitemindex, labelangleitemindex; char *tileitem; - char *tileindex; // layer index file for tiling support + char *tileindex; /* layer index file for tiling support */ #ifndef SWIG int tileitemindex; - projectionObj projection; // projection information for the layer - int project; // boolean variable, do we need to project this layer or not -#endif + projectionObj projection; /* projection information for the layer */ + int project; /* boolean variable, do we need to project this layer or not */ +#endif /* not SWIG */ - int units; // units of the projection + int units; /* units of the projection */ #ifndef SWIG - featureListNodeObjPtr features; // linked list so we don't need a counter - featureListNodeObjPtr currentfeature; // pointer to the current feature -#endif + featureListNodeObjPtr features; /* linked list so we don't need a counter */ + featureListNodeObjPtr currentfeature; /* pointer to the current feature */ +#endif /* SWIG */ char *connection; enum MS_CONNECTION_TYPE connectiontype; #ifndef SWIG struct layer_obj *sameconnection; - // SDL has converted OracleSpatial, SDE, Graticules, MyGIS - void *layerinfo; // all connection types should use this generic pointer to a vendor specific structure - void *ogrlayerinfo; // For OGR layers, will contain a msOGRLayerInfo struct - void *wfslayerinfo; // For WFS layers, will contain a msWFSLayerInfo struct -#endif + /* SDL has converted OracleSpatial, SDE, Graticules, MyGIS */ + void *layerinfo; /* all connection types should use this generic pointer to a vendor specific structure */ + void *ogrlayerinfo; /* For OGR layers, will contain a msOGRLayerInfo struct */ + void *wfslayerinfo; /* For WFS layers, will contain a msWFSLayerInfo struct */ +#endif /* not SWIG */ - // attribute/classification handling components + /* attribute/classification handling components */ #ifdef SWIG %immutable; -#endif +#endif /* SWIG */ int numitems; #ifdef SWIG %mutable; -#endif +#endif /* SWIG */ #ifndef SWIG char **items; - void *iteminfo; // connection specific information necessary to retrieve values - expressionObj filter; // connection specific attribute filter + void *iteminfo; /* connection specific information necessary to retrieve values */ + expressionObj filter; /* connection specific attribute filter */ int bandsitemindex; int filteritemindex; int styleitemindex; -#endif +#endif /* not SWIG */ - char *bandsitem; // which item in a tile contains bands to use (tiled raster data only) + char *bandsitem; /* which item in a tile contains bands to use (tiled raster data only) */ char *filteritem; - char *styleitem; // item to be used for style lookup - can also be 'AUTO' + char *styleitem; /* item to be used for style lookup - can also be 'AUTO' */ - char *requires; // context expressions, simple enough to not use expressionObj + char *requires; /* context expressions, simple enough to not use expressionObj */ char *labelrequires; hashTableObj metadata; - int transparency; // transparency value 0-100 + int transparency; /* transparency value 0-100 */ int dump; int debug; #ifndef SWIG char **processing; joinObj *joins; -#endif +#endif /* not SWIG */ #ifdef SWIG %immutable; -#endif +#endif /* SWIG */ #ifndef SWIGJAVA rectObj extent; -#endif +#endif /* not SWIGJAVA */ int numprocessing; int numjoins; #ifdef SWIG %mutable; -#endif +#endif /* SWIG */ } layerObj; -// MAP OBJECT - encompasses everything used in an Internet mapping application +/* MAP OBJECT - encompasses everything used in an Internet mapping application */ typedef struct map_obj{ /* structure for a map */ char *name; /* small identifier for naming etc. */ int status; /* is map creation on or off */ @@ -956,24 +964,24 @@ typedef struct map_obj{ /* structure for #ifndef SWIG layerObj *layers; -#endif +#endif /* SWIG */ #ifdef SWIG %immutable; -#endif +#endif /* SWIG */ int numlayers; /* number of layers in mapfile */ #ifdef SWIG %mutable; -#endif +#endif /* SWIG */ symbolSetObj symbolset; fontSetObj fontset; labelCacheObj labelcache; /* we need this here so multiple feature processors can access it */ - int transparent; // TODO - Deprecated - int interlace; // TODO - Deprecated - int imagequality; // TODO - Deprecated + int transparent; /* TODO - Deprecated */ + int interlace; /* TODO - Deprecated */ + int imagequality; /* TODO - Deprecated */ rectObj extent; /* map extent array */ double cellsize; /* in map units */ @@ -994,7 +1002,7 @@ typedef struct map_obj{ /* structure for #ifdef SWIG %immutable; -#endif +#endif /* SWIG */ int numoutputformats; outputFormatObj **outputformatlist; outputFormatObj *outputformat; @@ -1002,12 +1010,12 @@ typedef struct map_obj{ /* structure for char *imagetype; /* name of current outputformat */ #ifdef SWIG %mutable; -#endif // SWIG +#endif /* SWIG */ #ifndef SWIG projectionObj projection; /* projection information for output map */ projectionObj latlon; /* geographic projection definition */ -#endif +#endif /* not SWIG */ referenceMapObj reference; scalebarObj scalebar; @@ -1026,7 +1034,7 @@ typedef struct map_obj{ /* structure for hashTableObj configoptions; } mapObj; -//SWF Object structure +/* SWF Object structure */ #ifdef USE_MING_FLASH typedef struct { mapObj *map; @@ -1036,31 +1044,31 @@ typedef struct { int nCurrentMovie; int nCurrentLayerIdx; int nCurrentShapeIdx; - void *imagetmp; //used when the output format is SINGLE - //(one movie for the whole map) - int *panLayerIndex; // keeps the layer index for every movie created. + void *imagetmp; /* used when the output format is SINGLE */ + /* (one movie for the whole map) */ + int *panLayerIndex; /* keeps the layer index for every movie created. */ } SWFObj; -#endif +#endif /* USE_MING_FLASH */ -//PDF Object structure +/* PDF Object structure */ #ifdef USE_PDF typedef struct { mapObj *map; PDF *pdf; - void *imagetmp; //used when the FORMATOPTION "OUTPUT_TYPE=RASTER" + void *imagetmp; /* used when the FORMATOPTION "OUTPUT_TYPE=RASTER" */ } PDFObj; -#endif +#endif /* USE_PDF */ -// IMAGE OBJECT - a wrapper for GD images +/* IMAGE OBJECT - a wrapper for GD images */ typedef struct { #ifdef SWIG %immutable; -#endif +#endif /* SWIG */ int width, height; char *imagepath, *imageurl; #ifdef SWIG %mutable; -#endif +#endif /* SWIG */ outputFormatObj *format; int renderer; @@ -1071,25 +1079,25 @@ typedef struct { gdImagePtr gd; #ifdef USE_MING_FLASH SWFObj *swf; -#endif +#endif /* USE_MING_FLASH */ #ifdef USE_PDF PDFObj *pdf; -#endif +#endif /* USE_PDF */ char *imagemap; short *raw_16bit; float *raw_float; unsigned char *raw_byte; } img; -#endif +#endif /* not SWIG */ } imageObj; -// Function prototypes, wrapable +/* Function prototypes, wrapable */ MS_DLL_EXPORT int msSaveImage(mapObj *map, imageObj *img, char *filename); MS_DLL_EXPORT void msFreeImage(imageObj *img); MS_DLL_EXPORT void msCleanup(void); -// Function prototypes, not wrapable +/* Function prototypes, not wrapable */ #ifndef SWIG int msDrawSDELayer(mapObj *map, layerObj *layer, gdImagePtr img); /* in mapsde.c */ @@ -1123,9 +1131,9 @@ MS_DLL_EXPORT void freeFeatureList(featu MS_DLL_EXPORT int msLoadProjectionString(projectionObj *p, char *value); -// To be used *only* within the mapfile loading phase +/* To be used *only* within the mapfile loading phase */ MS_DLL_EXPORT int loadExpressionString(expressionObj *exp, char *value); -// Use this next, thread safe wrapper, function everywhere else +/* Use this next, thread safe wrapper, function everywhere else */ MS_DLL_EXPORT int msLoadExpressionString(expressionObj *exp, char *value); MS_DLL_EXPORT void freeExpression(expressionObj *exp); @@ -1133,7 +1141,7 @@ MS_DLL_EXPORT int getClassIndex(layerObj -// For maplabel and mappdf +/* For maplabel and mappdf */ int labelInImage(int width, int height, shapeObj *lpoly, int buffer); int intersectLabelPolygons(shapeObj *p1, shapeObj *p2); pointObj get_metrics(pointObj *p, int position, rectObj rect, int ox, int oy, double angle, int buffer, shapeObj *poly); @@ -1145,7 +1153,7 @@ double dist(pointObj a, pointObj b); ** Main API Functions */ -// mapobject.c +/* mapobject.c */ MS_DLL_EXPORT void msFreeMap(mapObj *map); MS_DLL_EXPORT mapObj *msNewMapObj(void); @@ -1169,9 +1177,9 @@ MS_DLL_EXPORT int msMapRestoreRealExtent MS_DLL_EXPORT int msMapLoadOWSParameters( mapObj *map, cgiRequestObj *request, const char *wmtver_string ); -// mapfile.c +/* mapfile.c */ -MS_DLL_EXPORT int msGetLayerIndex(mapObj *map, char *name); // in mapfile.c +MS_DLL_EXPORT int msGetLayerIndex(mapObj *map, char *name); /* in mapfile.c */ MS_DLL_EXPORT int msGetSymbolIndex(symbolSetObj *set, char *name, int try_addimage_if_notfound); MS_DLL_EXPORT mapObj *msLoadMap(char *filename, char *new_mappath); MS_DLL_EXPORT int msSaveMap(mapObj *map, char *filename); @@ -1182,25 +1190,25 @@ MS_DLL_EXPORT void msFree(void *p); MS_DLL_EXPORT char **msTokenizeMap(char *filename, int *numtokens); MS_DLL_EXPORT int msInitLabelCache(labelCacheObj *cache); MS_DLL_EXPORT int msFreeLabelCache(labelCacheObj *cache); -MS_DLL_EXPORT int msCheckConnection(layerObj * layer); // connection pooling functions (mapfile.c) +MS_DLL_EXPORT int msCheckConnection(layerObj * layer); /* connection pooling functions (mapfile.c) */ MS_DLL_EXPORT void msCloseConnections(mapObj *map); #if defined USE_PDF -MS_DLL_EXPORT PDF *msDrawMapPDF(mapObj *map, PDF *pdf, hashTableObj fontHash); // mappdf.c -#endif +MS_DLL_EXPORT PDF *msDrawMapPDF(mapObj *map, PDF *pdf, hashTableObj fontHash); /* mappdf.c */ +#endif /* USE_PDF */ MS_DLL_EXPORT void msOGRCleanup(void); MS_DLL_EXPORT void msGDALCleanup(void); MS_DLL_EXPORT void msGDALInitialize(void); -MS_DLL_EXPORT imageObj *msDrawScalebar(mapObj *map); // in mapscale.c +MS_DLL_EXPORT imageObj *msDrawScalebar(mapObj *map); /* in mapscale.c */ MS_DLL_EXPORT int msCalculateScale(rectObj extent, int units, int width, int height, double resolution, double *scale); MS_DLL_EXPORT double msInchesPerUnit(int units, double center_lat); MS_DLL_EXPORT int msEmbedScalebar(mapObj *map, gdImagePtr img); -MS_DLL_EXPORT int msPointInRect(pointObj *p, rectObj *rect); // in mapsearch.c +MS_DLL_EXPORT int msPointInRect(pointObj *p, rectObj *rect); /* in mapsearch.c */ MS_DLL_EXPORT int msRectOverlap(rectObj *a, rectObj *b); MS_DLL_EXPORT int msRectContained(rectObj *a, rectObj *b); @@ -1223,7 +1231,7 @@ MS_DLL_EXPORT int msIntersectPolylinePol MS_DLL_EXPORT int msIntersectPolygons(shapeObj *p1, shapeObj *p2); MS_DLL_EXPORT int msIntersectPolylines(shapeObj *line1, shapeObj *line2); -MS_DLL_EXPORT int msSaveQuery(mapObj *map, char *filename); // in mapquery.c +MS_DLL_EXPORT int msSaveQuery(mapObj *map, char *filename); /* in mapquery.c */ MS_DLL_EXPORT int msLoadQuery(mapObj *map, char *filename); MS_DLL_EXPORT int msQueryByIndex(mapObj *map, int qlayer, int tileindex, int shapeindex); MS_DLL_EXPORT int msQueryByIndexAdd(mapObj *map, int qlayer, int tileindex, int shapeindex); @@ -1241,7 +1249,7 @@ MS_DLL_EXPORT int msRasterQueryByPoint(m pointObj p, double buffer ); -MS_DLL_EXPORT void trimBlanks(char *string); // in mapstring.c +MS_DLL_EXPORT void trimBlanks(char *string); /* in mapstring.c */ MS_DLL_EXPORT char *trimLeft(char *string); MS_DLL_EXPORT char *chop(char *string); MS_DLL_EXPORT void trimEOL(char *string); @@ -1266,24 +1274,24 @@ MS_DLL_EXPORT char *msHashString(const c #ifdef NEED_STRDUP MS_DLL_EXPORT char *strdup(char *s); -#endif +#endif /* NEED_STRDUP */ #ifdef NEED_STRNCASECMP MS_DLL_EXPORT int strncasecmp(const char *s1, const char *s2, int len); -#endif +#endif /* NEED_STRNCASECMP */ #ifdef NEED_STRCASECMP MS_DLL_EXPORT int strcasecmp(const char *s1, const char *s2); -#endif +#endif /* NEED_STRCASECMP */ #ifdef NEED_STRLCAT MS_DLL_EXPORT size_t strlcat(char *dst, const char *src, size_t siz); -#endif +#endif /* NEED_STRLCAT */ -// in mapsymbol.c -// Use this function *only* with mapfile loading phase +/* in mapsymbol.c */ +/* Use this function *only* with mapfile loading phase */ MS_DLL_EXPORT int loadSymbolSet(symbolSetObj *symbolset, mapObj *map); -// Use this threadsafe wrapper everywhere else +/* Use this threadsafe wrapper everywhere else */ MS_DLL_EXPORT int msLoadSymbolSet(symbolSetObj *symbolset, mapObj *map); MS_DLL_EXPORT int msCopySymbol(symbolObj *dst, symbolObj *src, mapObj *map); MS_DLL_EXPORT int msCopySymbolSet(symbolSetObj *dst, symbolSetObj *src, mapObj *map); @@ -1304,12 +1312,12 @@ MS_DLL_EXPORT int msGetCharacterSize(cha MS_DLL_EXPORT double msSymbolGetDefaultSize(symbolObj *s); MS_DLL_EXPORT void freeImageCache(struct imageCacheObj *ic); -MS_DLL_EXPORT imageObj *msDrawLegend(mapObj *map, int scale_independent); // in maplegend.c +MS_DLL_EXPORT imageObj *msDrawLegend(mapObj *map, int scale_independent); /* in maplegend.c */ MS_DLL_EXPORT int msEmbedLegend(mapObj *map, gdImagePtr img); MS_DLL_EXPORT int msDrawLegendIcon(mapObj* map, layerObj* lp, classObj* myClass, int width, int height, gdImagePtr img, int dstX, int dstY); MS_DLL_EXPORT imageObj *msCreateLegendIcon(mapObj* map, layerObj* lp, classObj* myClass, int width, int height); -MS_DLL_EXPORT int msLoadFontSet(fontSetObj *fontSet, mapObj *map); // in maplabel.c +MS_DLL_EXPORT int msLoadFontSet(fontSetObj *fontSet, mapObj *map); /* in maplabel.c */ MS_DLL_EXPORT int msInitFontSet(fontSetObj *fontset); MS_DLL_EXPORT int msFreeFontSet(fontSetObj *fontset); @@ -1320,7 +1328,7 @@ MS_DLL_EXPORT gdFontPtr msGetBitmapFont( MS_DLL_EXPORT int msImageTruetypePolyline(symbolSetObj *symbolset, gdImagePtr img, shapeObj *p, styleObj *style, double scalefactor); MS_DLL_EXPORT int msImageTruetypeArrow(symbolSetObj *symbolset, gdImagePtr img, shapeObj *p, styleObj *style, double scalefactor); -MS_DLL_EXPORT void msFreeShape(shapeObj *shape); // in mapprimative.c +MS_DLL_EXPORT void msFreeShape(shapeObj *shape); /* in mapprimative.c */ MS_DLL_EXPORT void msInitShape(shapeObj *shape); MS_DLL_EXPORT int msCopyShape(shapeObj *from, shapeObj *to); MS_DLL_EXPORT int *msGetOuterList(shapeObj *shape); @@ -1337,16 +1345,16 @@ MS_DLL_EXPORT int msPolylineLabelPoint(s MS_DLL_EXPORT int msPolygonLabelPoint(shapeObj *p, pointObj *lp, int min_dimension); MS_DLL_EXPORT int msAddLine(shapeObj *p, lineObj *new_line); -MS_DLL_EXPORT int msDrawRasterLayer(mapObj *map, layerObj *layer, imageObj *image); // in mapraster.c +MS_DLL_EXPORT int msDrawRasterLayer(mapObj *map, layerObj *layer, imageObj *image); /* in mapraster.c */ MS_DLL_EXPORT imageObj *msDrawReferenceMap(mapObj *map); -MS_DLL_EXPORT size_t msGetBitArraySize(int numbits); // in mapbits.c +MS_DLL_EXPORT size_t msGetBitArraySize(int numbits); /* in mapbits.c */ MS_DLL_EXPORT char *msAllocBitArray(int numbits); MS_DLL_EXPORT int msGetBit(char *array, int index); MS_DLL_EXPORT void msSetBit(char *array, int index, int value); MS_DLL_EXPORT void msFlipBit(char *array, int index); -MS_DLL_EXPORT int msLayerOpen(layerObj *layer); // in maplayer.c +MS_DLL_EXPORT int msLayerOpen(layerObj *layer); /* in maplayer.c */ MS_DLL_EXPORT int msLayerIsOpen(layerObj *layer); MS_DLL_EXPORT void msLayerClose(layerObj *layer); MS_DLL_EXPORT int msLayerWhichShapes(layerObj *layer, rectObj rect); @@ -1369,11 +1377,11 @@ MS_DLL_EXPORT char* msLayerGetFilterStri MS_DLL_EXPORT int msLayerSetTimeFilter(layerObj *lp, const char *timestring, const char *timefield); -// maplayer.c +/* maplayer.c */ MS_DLL_EXPORT int msINLINELayerGetShape(layerObj *layer, shapeObj *shape, int shapeindex); MS_DLL_EXPORT int msLayerGetNumFeatures(layerObj *layer); -MS_DLL_EXPORT int msTiledSHPOpenFile(layerObj *layer); // in mapshape.c +MS_DLL_EXPORT int msTiledSHPOpenFile(layerObj *layer); /* in mapshape.c */ MS_DLL_EXPORT int msTiledSHPWhichShapes(layerObj *layer, rectObj rect); MS_DLL_EXPORT int msTiledSHPNextShape(layerObj *layer, shapeObj *shape); MS_DLL_EXPORT int msTiledSHPGetShape(layerObj *layer, shapeObj *shape, int tile, long record); @@ -1382,7 +1390,7 @@ MS_DLL_EXPORT int msTiledSHPLayerGetItem MS_DLL_EXPORT int msTiledSHPLayerInitItemInfo(layerObj *layer); MS_DLL_EXPORT int msTiledSHPLayerGetExtent(layerObj *layer, rectObj *extent); -MS_DLL_EXPORT int msOGRLayerOpen(layerObj *layer, const char *pszOverrideConnection); // in mapogr.cpp +MS_DLL_EXPORT int msOGRLayerOpen(layerObj *layer, const char *pszOverrideConnection); /* in mapogr.cpp */ MS_DLL_EXPORT int msOGRLayerIsOpen(layerObj *layer); MS_DLL_EXPORT int msOGRLayerClose(layerObj *layer); MS_DLL_EXPORT int msOGRLayerWhichShapes(layerObj *layer, rectObj rect); @@ -1396,9 +1404,9 @@ MS_DLL_EXPORT int msOGRLayerGetAutoStyle #ifdef USE_OGR MS_DLL_EXPORT int msOGRGeometryToShape(OGRGeometryH hGeometry, shapeObj *shape, OGRwkbGeometryType type); -#endif +#endif /* USE_OGR */ -MS_DLL_EXPORT int msPOSTGISLayerOpen(layerObj *layer); // in mappostgis.c +MS_DLL_EXPORT int msPOSTGISLayerOpen(layerObj *layer); /* in mappostgis.c */ MS_DLL_EXPORT int msPOSTGISLayerIsOpen(layerObj *layer); MS_DLL_EXPORT void msPOSTGISLayerFreeItemInfo(layerObj *layer); MS_DLL_EXPORT int msPOSTGISLayerInitItemInfo(layerObj *layer); @@ -1411,7 +1419,7 @@ MS_DLL_EXPORT int msPOSTGISLayerGetShape MS_DLL_EXPORT int msPOSTGISLayerGetItems(layerObj *layer); MS_DLL_EXPORT int msPOSTGISLayerResultClose(layerObj *layer); -MS_DLL_EXPORT int msMYGISLayerOpen(layerObj *layer); // in mapmygis.c +MS_DLL_EXPORT int msMYGISLayerOpen(layerObj *layer); /* in mapmygis.c */ MS_DLL_EXPORT int msMYGISLayerIsOpen(layerObj *layer); MS_DLL_EXPORT void msMYGISLayerFreeItemInfo(layerObj *layer); MS_DLL_EXPORT int msMYGISLayerInitItemInfo(layerObj *layer); @@ -1423,7 +1431,7 @@ MS_DLL_EXPORT int msMYGISLayerGetExtent( MS_DLL_EXPORT int msMYGISLayerGetShapeRandom(layerObj *layer, shapeObj *shape, long *record); MS_DLL_EXPORT int msMYGISLayerGetItems(layerObj *layer); -MS_DLL_EXPORT int msSDELayerOpen(layerObj *layer); // in mapsde.c +MS_DLL_EXPORT int msSDELayerOpen(layerObj *layer); /* in mapsde.c */ MS_DLL_EXPORT int msSDELayerIsOpen(layerObj *layer); MS_DLL_EXPORT void msSDELayerClose(layerObj *layer); MS_DLL_EXPORT int msSDELayerWhichShapes(layerObj *layer, rectObj rect); @@ -1449,7 +1457,7 @@ MS_DLL_EXPORT int msOracleSpatialLayerIn MS_DLL_EXPORT void msOracleSpatialLayerFreeItemInfo(layerObj *layer); MS_DLL_EXPORT int msOracleSpatialLayerGetAutoStyle(mapObj *map, layerObj *layer, classObj *c, int tile, long record); -MS_DLL_EXPORT int msGraticuleLayerOpen(layerObj *layer); // in mapGraticule.cpp +MS_DLL_EXPORT int msGraticuleLayerOpen(layerObj *layer); /* in mapGraticule.cpp */ MS_DLL_EXPORT int msGraticuleLayerIsOpen(layerObj *layer); MS_DLL_EXPORT int msGraticuleLayerClose(layerObj *layer); MS_DLL_EXPORT int msGraticuleLayerWhichShapes(layerObj *layer, rectObj rect); @@ -1461,7 +1469,7 @@ MS_DLL_EXPORT int msGraticuleLayerGetSha MS_DLL_EXPORT int msGraticuleLayerGetExtent(layerObj *layer, rectObj *extent); MS_DLL_EXPORT int msGraticuleLayerGetAutoStyle(mapObj *map, layerObj *layer, classObj *c, int tile, long record); -MS_DLL_EXPORT int msRASTERLayerOpen(layerObj *layer); // in maprasterquery.c +MS_DLL_EXPORT int msRASTERLayerOpen(layerObj *layer); /* in maprasterquery.c */ MS_DLL_EXPORT int msRASTERLayerIsOpen(layerObj *layer); MS_DLL_EXPORT void msRASTERLayerFreeItemInfo(layerObj *layer); MS_DLL_EXPORT int msRASTERLayerInitItemInfo(layerObj *layer); @@ -1569,22 +1577,22 @@ MS_DLL_EXPORT int msDrawLabelCacheGD(gdI MS_DLL_EXPORT void msImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h, int pct); -// Modify the character encoding. +/* Modify the character encoding. */ char *msGetEncodedString(const char *string, const char *encoding); -// various JOIN functions (in mapjoin.c) +/* various JOIN functions (in mapjoin.c) */ MS_DLL_EXPORT int msJoinConnect(layerObj *layer, joinObj *join); MS_DLL_EXPORT int msJoinPrepare(joinObj *join, shapeObj *shape); MS_DLL_EXPORT int msJoinNext(joinObj *join); MS_DLL_EXPORT int msJoinClose(joinObj *join); -//in mapraster.c +/*in mapraster.c */ MS_DLL_EXPORT int msDrawRasterLayerLow(mapObj *map, layerObj *layer, imageObj *image); MS_DLL_EXPORT int msAddColorGD(mapObj *map, gdImagePtr img, int cmt, int r, int g, int b); MS_DLL_EXPORT int msGetClass(layerObj *layer, colorObj *color); MS_DLL_EXPORT int msGetClass_Float(layerObj *layer, float fValue); -//in mapdrawgdal.c +/* in mapdrawgdal.c */ MS_DLL_EXPORT int msDrawRasterLayerGDAL(mapObj *map, layerObj *layer, imageObj *image, void *hDSVoid ); MS_DLL_EXPORT int msGetGDALGeoTransform(void *hDS, mapObj *map, layerObj *layer, double *padfGeoTransform ); MS_DLL_EXPORT int *msGetGDALBandList( layerObj *layer, void *hDS, int max_bands, int *band_count ); @@ -1597,8 +1605,8 @@ MS_DLL_EXPORT double msGetGDALNoDataValu /* ==================================================================== */ /* Prototypes for functions in maputil.c */ /* ==================================================================== */ -// For mappdf -MS_DLL_EXPORT int getRgbColor(mapObj *map,int i,int *r,int *g,int *b); // maputil.c +/* For mappdf */ +MS_DLL_EXPORT int getRgbColor(mapObj *map,int i,int *r,int *g,int *b); /* maputil.c */ MS_DLL_EXPORT int msValidateContexts(mapObj *map); MS_DLL_EXPORT int msEvalContext(mapObj *map, layerObj *layer, char *context); MS_DLL_EXPORT int msEvalExpression(expressionObj *expression, int itemindex, char **items, int numitems); @@ -1609,21 +1617,21 @@ MS_DLL_EXPORT double msAdjustExtent(rect MS_DLL_EXPORT int msConstrainExtent(rectObj *bounds, rectObj *rect, double overlay); MS_DLL_EXPORT int *msGetLayersIndexByGroup(mapObj *map, char *groupname, int *nCount); -//Functions to chnage the drawing order of the layers. -//Defined in mapobject.c +/* Functions to chnage the drawing order of the layers. */ +/* Defined in mapobject.c */ MS_DLL_EXPORT int msMoveLayerUp(mapObj *map, int nLayerIndex); MS_DLL_EXPORT int msMoveLayerDown(mapObj *map, int nLayerIndex); MS_DLL_EXPORT int msSetLayersdrawingOrder(mapObj *self, int *panIndexes); MS_DLL_EXPORT int msInsertLayer(mapObj *map, layerObj *layer, int nIndex); MS_DLL_EXPORT layerObj *msRemoveLayer(mapObj *map, int nIndex); -//Defined in layerobject.c +/* Defined in layerobject.c */ MS_DLL_EXPORT int msInsertClass(layerObj *layer,classObj *classobj,int nIndex); MS_DLL_EXPORT classObj *msRemoveClass(layerObj *layer, int nIndex); MS_DLL_EXPORT int msMoveClassUp(layerObj *layer, int nClassIndex); MS_DLL_EXPORT int msMoveClassDown(layerObj *layer, int nClassIndex); -// classobject.c +/* classobject.c */ MS_DLL_EXPORT int msMoveStyleUp(classObj *classo, int nStyleIndex); MS_DLL_EXPORT int msMoveStyleDown(classObj *classo, int nStyleIndex); MS_DLL_EXPORT int msDeleteStyle(classObj *classo, int iStyleIndex); @@ -1631,7 +1639,7 @@ MS_DLL_EXPORT int msInsertStyle(classObj int nStyleIndex); MS_DLL_EXPORT styleObj *msRemoveStyle(classObj *classo, int index); -// Measured shape utility functions. +/* Measured shape utility functions. */ MS_DLL_EXPORT pointObj *msGetPointUsingMeasure(shapeObj *shape, double m); MS_DLL_EXPORT pointObj *msGetMeasureUsingPoint(shapeObj *shape, pointObj *point); @@ -1660,13 +1668,13 @@ MS_DLL_EXPORT void msDrawShadeSymbolSWF( MS_DLL_EXPORT void msDrawMarkerSymbolSWF(symbolSetObj *symbolset, imageObj *image, pointObj *p, styleObj *style, double scalefactor); MS_DLL_EXPORT int msDrawRasterLayerSWF(mapObj *map, layerObj *layer, imageObj *image); MS_DLL_EXPORT int msDrawVectorLayerAsRasterSWF(mapObj *map, layerObj *layer, imageObj*image); -// int msDrawWMSLayerSWF(int nLayerId, httpRequestObj *pasReqInfo, int numRequests, mapObj *map, layerObj *layer, imageObj *image); +/* int msDrawWMSLayerSWF(int nLayerId, httpRequestObj *pasReqInfo, int numRequests, mapObj *map, layerObj *layer, imageObj *image); */ MS_DLL_EXPORT void msTransformShapeSWF(shapeObj *shape, rectObj extent, double cellsize); MS_DLL_EXPORT int msSaveImageSWF(imageObj *image, char *filename); MS_DLL_EXPORT void msFreeImageSWF(imageObj *image); MS_DLL_EXPORT int draw_textSWF(imageObj *image, pointObj labelPnt, char *string, labelObj *label, fontSetObj *fontset, double scalefactor); MS_DLL_EXPORT void msDrawStartShapeSWF(mapObj *map, layerObj *layer, imageObj *image, shapeObj *shape); -#endif +#endif /* USE_MING_FLASH */ /* ==================================================================== */ /* End of prototypes for functions in mapswf.c */ @@ -1693,7 +1701,7 @@ MS_DLL_EXPORT int msSaveImagePDF(imageOb MS_DLL_EXPORT void msFreeImagePDF(imageObj *image); MS_DLL_EXPORT int msDrawTextPDF(imageObj *image, pointObj labelPnt, char *string, labelObj *label, fontSetObj *fontset, double scalefactor); MS_DLL_EXPORT void msDrawStartShapePDF(mapObj *map, layerObj *layer, imageObj *image, shapeObj *shape); -#endif +#endif /* USE_PDF */ /* ==================================================================== */ /* End of prototypes for functions in mappdf.c */ @@ -1722,7 +1730,7 @@ MS_DLL_EXPORT int msOutputFormatValidate #ifndef gdImageTrueColor # define gdImageTrueColor(x) (0) -#endif +#endif /* not gdImageTrueColor */ /* ==================================================================== */ /* prototypes for functions in mapgdal.c */ Index: mapows.h =================================================================== RCS file: /data2/cvsroot/mapserver/mapows.h,v retrieving revision 1.48 diff -u -3 -p -u -r1.48 mapows.h --- mapows.h 29 Dec 2004 22:49:57 -0000 1.48 +++ mapows.h 1 Feb 2005 22:16:10 -0000 @@ -169,8 +169,8 @@ typedef struct char *pszTypeName; char *pszFilter; int nMaxFeatures; - char *pszBbox; //only used with a Get Request - char *pszOutputFormat; //only used with DescibeFeatureType + char *pszBbox; /* only used with a Get Request */ + char *pszOutputFormat; /* only used with DescibeFeatureType */ } wfsParamsObj; @@ -210,7 +210,7 @@ MS_DLL_EXPORT char *msOWSTerminateOnline MS_DLL_EXPORT char *msOWSGetOnlineResource(mapObj *map, const char *namespaces, const char *metadata_name, cgiRequestObj *req); MS_DLL_EXPORT const char *msOWSGetSchemasLocation(mapObj *map); -// Constants for OWS Service version numbers +/* Constants for OWS Service version numbers */ #define OWS_0_1_2 0x000102 #define OWS_0_1_4 0x000104 #define OWS_0_1_6 0x000106 @@ -221,18 +221,18 @@ MS_DLL_EXPORT const char *msOWSGetSchema #define OWS_1_0_8 0x010008 #define OWS_1_1_0 0x010100 #define OWS_1_1_1 0x010101 -#define OWS_VERSION_MAXLEN 20 // Buffer size for msOWSGetVersionString() +#define OWS_VERSION_MAXLEN 20 /* Buffer size for msOWSGetVersionString() */ MS_DLL_EXPORT int msOWSParseVersionString(const char *pszVersion); MS_DLL_EXPORT const char *msOWSGetVersionString(int nVersion, char *pszBuffer); -// OWS_NOERR and OWS_WARN passed as action_if_not_found to printMetadata() +/* OWS_NOERR and OWS_WARN passed as action_if_not_found to printMetadata() */ #define OWS_NOERR 0 #define OWS_WARN 1 -// OWS_WMS and OWS_WFS used for functions that differ in behavior between -// WMS and WFS services (e.g. msOWSPrintLatLonBoundingBox()) +/* OWS_WMS and OWS_WFS used for functions that differ in behavior between */ +/* WMS and WFS services (e.g. msOWSPrintLatLonBoundingBox()) */ #define OWS_WMS 1 #define OWS_WFS 2 @@ -306,11 +306,11 @@ const char *msOWSGetEPSGProj(projectionO /*==================================================================== * mapgml.c *====================================================================*/ -#define OWS_GML2 0 // Supported GML formats +#define OWS_GML2 0 /* Supported GML formats */ #define OWS_GML3 1 #ifdef USE_WMS_SVR -// export to fix bug 851 +/* export to fix bug 851 */ MS_DLL_EXPORT int msGMLWriteQuery(mapObj *map, char *filename, const char *namespaces); #endif @@ -389,7 +389,7 @@ MS_DLL_EXPORT int msLoadMapContextURL(ma * mapwcs.c *====================================================================*/ -int msWCSDispatch(mapObj *map, cgiRequestObj *requestobj); // only 1 public function +int msWCSDispatch(mapObj *map, cgiRequestObj *requestobj); /* only 1 public function */ #endif /* MAPOWS_H */ Index: mapprimitive.h =================================================================== RCS file: /data2/cvsroot/mapserver/mapprimitive.h,v retrieving revision 1.14 diff -u -3 -p -u -r1.14 mapprimitive.h --- mapprimitive.h 29 Nov 2004 15:09:34 -0000 1.14 +++ mapprimitive.h 1 Feb 2005 22:16:10 -0000 @@ -79,7 +79,7 @@ typedef struct { #endif rectObj bounds; - int type; // MS_SHAPE_TYPE + int type; /* MS_SHAPE_TYPE */ long index; int tileindex; int classindex; @@ -108,8 +108,8 @@ typedef struct { typedef struct { int need_geotransform; double rotation_angle; - double geotransform[6]; // Pixel/line to georef. - double invgeotransform[6]; // georef to pixel/line + double geotransform[6]; /* Pixel/line to georef. */ + double invgeotransform[6]; /* georef to pixel/line */ } geotransformObj; #endif Index: mapproject.h =================================================================== RCS file: /data2/cvsroot/mapserver/mapproject.h,v retrieving revision 1.24 diff -u -3 -p -u -r1.24 mapproject.h --- mapproject.h 16 Nov 2004 21:56:18 -0000 1.24 +++ mapproject.h 1 Feb 2005 22:16:10 -0000 @@ -70,7 +70,7 @@ typedef struct { #else void *proj; #endif - geotransformObj gt; // extra transformation to apply + geotransformObj gt; /* extra transformation to apply */ #endif } projectionObj; Index: mapshape.h =================================================================== RCS file: /data2/cvsroot/mapserver/mapshape.h,v retrieving revision 1.32 diff -u -3 -p -u -r1.32 mapshape.h --- mapshape.h 21 Oct 2004 04:30:54 -0000 1.32 +++ mapshape.h 1 Feb 2005 22:16:10 -0000 @@ -45,7 +45,7 @@ extern "C" { #ifndef SWIG #define MS_PATH_LENGTH 1024 -// Shapefile types +/* Shapefile types */ #define SHP_POINT 1 #define SHP_ARC 3 #define SHP_POLYGON 5 @@ -97,7 +97,7 @@ typedef struct { int bUpdated; - int nBufSize; // these used static vars in shape readers, moved to be thread-safe + int nBufSize; /* these used static vars in shape readers, moved to be thread-safe */ uchar *pabyRec; int nPartMax; int *panParts; @@ -142,29 +142,29 @@ typedef DBFInfo * DBFHandle; typedef enum {FTString, FTInteger, FTDouble, FTInvalid} DBFFieldType; -// Shapefile object, no write access via scripts +/* Shapefile object, no write access via scripts */ typedef struct { #ifdef SWIG %immutable; #endif - char source[MS_PATH_LENGTH]; // full path to this file data + char source[MS_PATH_LENGTH]; /* full path to this file data */ #ifndef SWIG - SHPHandle hSHP; // SHP/SHX file pointer + SHPHandle hSHP; /* SHP/SHX file pointer */ #endif - int type; // shapefile type - int numshapes; // number of shapes - rectObj bounds; // shape extent + int type; /* shapefile type */ + int numshapes; /* number of shapes */ + rectObj bounds; /* shape extent */ #ifndef SWIG - DBFHandle hDBF; // DBF file pointer + DBFHandle hDBF; /* DBF file pointer */ #endif int lastshape; char *status; - rectObj statusbounds; // holds extent associated with the status vector + rectObj statusbounds; /* holds extent associated with the status vector */ int isopen; #ifdef SWIG @@ -172,7 +172,7 @@ typedef struct { #endif } shapefileObj; -// layerInfo structure for tiled shapefiles +/* layerInfo structure for tiled shapefiles */ typedef struct { shapefileObj *shpfile; shapefileObj *tileshpfile; @@ -181,13 +181,13 @@ typedef struct { #ifndef SWIG -// shapefileObj function prototypes +/* shapefileObj function prototypes */ MS_DLL_EXPORT int msSHPOpenFile(shapefileObj *shpfile, char *mode, char *filename); MS_DLL_EXPORT int msSHPCreateFile(shapefileObj *shpfile, char *filename, int type); MS_DLL_EXPORT void msSHPCloseFile(shapefileObj *shpfile); MS_DLL_EXPORT int msSHPWhichShapes(shapefileObj *shpfile, rectObj rect, int debug); -// SHP/SHX function prototypes +/* SHP/SHX function prototypes */ MS_DLL_EXPORT SHPHandle msSHPOpen( const char * pszShapeFile, const char * pszAccess ); MS_DLL_EXPORT SHPHandle msSHPCreate( const char * pszShapeFile, int nShapeType ); MS_DLL_EXPORT void msSHPClose( SHPHandle hSHP ); @@ -198,9 +198,9 @@ MS_DLL_EXPORT int msSHPReadPoint(SHPHand MS_DLL_EXPORT int msSHPWriteShape( SHPHandle psSHP, shapeObj *shape ); MS_DLL_EXPORT int msSHPWritePoint(SHPHandle psSHP, pointObj *point ); -// tiledShapefileObj function prototypes are in map.h +/* tiledShapefileObj function prototypes are in map.h */ -// XBase function prototypes +/* XBase function prototypes */ MS_DLL_EXPORT DBFHandle msDBFOpen( const char * pszDBFFile, const char * pszAccess ); MS_DLL_EXPORT void msDBFClose( DBFHandle hDBF ); MS_DLL_EXPORT DBFHandle msDBFCreate( const char * pszDBFFile ); Index: mapsymbol.h =================================================================== RCS file: /data2/cvsroot/mapserver/mapsymbol.h,v retrieving revision 1.17 diff -u -3 -p -u -r1.17 mapsymbol.h --- mapsymbol.h 21 Oct 2004 04:30:55 -0000 1.17 +++ mapsymbol.h 1 Feb 2005 22:16:10 -0000 @@ -40,13 +40,13 @@ enum MS_SYMBOL_TYPE {MS_SYMBOL_SIMPLE, MS_SYMBOL_VECTOR, MS_SYMBOL_ELLIPSE, MS_SYMBOL_PIXMAP, MS_SYMBOL_TRUETYPE, MS_SYMBOL_CARTOLINE, MS_SYMBOL_HATCH}; -#define MS_MAXSYMBOLS 64 // maximum number of symbols in a symbol file -#define MS_MAXVECTORPOINTS 100 // shade, marker and line symbol parameters +#define MS_MAXSYMBOLS 64 /* maximum number of symbols in a symbol file */ +#define MS_MAXVECTORPOINTS 100 /* shade, marker and line symbol parameters */ #define MS_MAXSTYLELENGTH 10 #define MS_IMAGECACHESIZE 6 -// COLOR OBJECT +/* COLOR OBJECT */ typedef struct { int pen; int red; @@ -67,20 +67,20 @@ struct imageCacheObj { gdImagePtr img; struct imageCacheObj *next; }; -#endif // SWIG +#endif /* SWIG */ typedef struct { char *name; int type; #ifndef SWIG - int inmapfile; //boolean value for writing + int inmapfile; /* boolean value for writing */ /* ** Pointer to his map */ struct map_obj *map; -#endif // SWIG +#endif /* SWIG */ /* ** MS_SYMBOL_VECTOR and MS_SYMBOL_ELLIPSE options */ @@ -92,14 +92,14 @@ typedef struct { #ifdef SWIG %immutable; -#endif // SWIG +#endif /* SWIG */ int numpoints; #ifdef SWIG %mutable; -#endif // SWIG +#endif /* SWIG */ int filled; - int stylelength; // Number of intervals (eg. dashes) in the style + int stylelength; /* Number of intervals (eg. dashes) in the style */ int style[MS_MAXSTYLELENGTH]; /* @@ -107,7 +107,7 @@ typedef struct { */ #ifndef SWIG gdImagePtr img; -#endif // SWIG +#endif /* SWIG */ char *imagepath; int transparent; int transparentcolor; Index: maptemplate.h =================================================================== RCS file: /data2/cvsroot/mapserver/maptemplate.h,v retrieving revision 1.12 diff -u -3 -p -u -r1.12 maptemplate.h --- maptemplate.h 21 Oct 2004 04:30:55 -0000 1.12 +++ maptemplate.h 1 Feb 2005 22:16:10 -0000 @@ -64,7 +64,7 @@ enum modes {BROWSE, ZOOMIN, ZOOMOUT, MAP */ typedef struct { - /// should the query and/or map be saved + /* should the query and/or map be saved */ int SaveMap, SaveQuery; cgiRequestObj *request; @@ -73,12 +73,12 @@ typedef struct char *Layers[MS_MAXLAYERS]; - /// number of layers specfied by a use + /* number of layers specfied by a use */ int NumLayers; layerObj *ResultLayer; - int UseShapes; // are results of a query to be used in calculating an extent of some sort + int UseShapes; /* are results of a query to be used in calculating an extent of some sort */ shapeObj SelectShape, ResultShape; @@ -87,16 +87,16 @@ typedef struct pointObj MapPnt; - /// default for browsing + /* default for browsing */ double fZoom, Zoom; - /// whether zooming in or out, default is pan or 0 + /* whether zooming in or out, default is pan or 0 */ int ZoomDirection; - /// can be BROWSE, QUERY, etc. + /* can be BROWSE, QUERY, etc. */ int Mode; - /// big enough for time + pid + /* big enough for time + pid */ char Id[IDSIZE]; int CoordSource; @@ -116,11 +116,11 @@ typedef struct /* ** variables for multiple query results processing */ - int RN; /// overall result number - int LRN; /// result number within a layer - int NL; /// total number of layers with results - int NR; /// total number or results - int NLR; /// number of results in a layer + int RN; /* overall result number */ + int LRN; /* result number within a layer */ + int NL; /* total number of layers with results */ + int NR; /* total number or results */ + int NLR; /* number of results in a layer */ } mapservObj; @@ -136,7 +136,7 @@ MS_DLL_EXPORT mapservObj* msAllocMapServ */ MS_DLL_EXPORT void msFreeMapServObj(mapservObj* msObj); -// For Mapserv.c +/* For Mapserv.c */ MS_DLL_EXPORT int isOn(mapservObj* msObj, char *name, char *group); MS_DLL_EXPORT int checkWebScale(mapservObj *msObj); MS_DLL_EXPORT int setExtent(mapservObj *msObj); Index: maptime.h =================================================================== RCS file: /data2/cvsroot/mapserver/maptime.h,v retrieving revision 1.9 diff -u -3 -p -u -r1.9 maptime.h --- maptime.h 28 Jan 2005 06:16:54 -0000 1.9 +++ maptime.h 1 Feb 2005 22:16:10 -0000 @@ -71,7 +71,7 @@ typedef enum TIME_RESOLUTION_YEAR =7 }MS_TIME_RESOLUTION; -// function prototypes +/* function prototypes */ void msTimeInit(struct tm *time); int msDateCompare(struct tm *time1, struct tm *time2); int msTimeCompare(struct tm *time1, struct tm *time2); Index: maptree.h =================================================================== RCS file: /data2/cvsroot/mapserver/maptree.h,v retrieving revision 1.7 diff -u -3 -p -u -r1.7 maptree.h --- maptree.h 21 Oct 2004 04:30:56 -0000 1.7 +++ maptree.h 1 Feb 2005 22:16:10 -0000 @@ -44,10 +44,10 @@ extern "C" { #define MAX_SUBNODES 4 typedef struct shape_tree_node { - // area covered by this node + /* area covered by this node */ rectObj rect; - // list of shapes stored at this node. + /* list of shapes stored at this node. */ int numshapes; int *ids; From steve.lime at DNR.STATE.MN.US Tue Feb 1 19:55:26 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:42 2008 Subject: non-spatial query optimization Message-ID: Ok with me... >>> Frank Warmerdam 02/01/05 4:10 PM >>> Folks, Paul Ramsey pointed out that the current msSHPWhichShapes() function requires a search rectangle. This means that any sort of query against a feature datasource in MapServer ends up having a bounding rectangle whether it is needed or not. This can result in substantial complication and extra cost in the underlying datastores to apply the spatial filter. For instance, in an RDBMS it results in a much more complex query that may end up being optimized poorly. In OGR having a spatial filter often screws up optimizations in the underlying datasources as well. I propose to change msSHPWhichShapes() to take a pointer to a rectObj, instead of passing in a rectObj by value. If the pointer is NULL it will be interpreted as meaning there is no spatial component to be tested. All the feature store providers will need to be updated accordingly, which I am willing to do for the more straight forward ones (ie. Shapefiles, OGR, PostGIS). The other provider maintainer would need to implement this themselves, though I would make a first pass through making the code return an error if a NULL rect was passed into these providers. Are there any objections to me making such a change in MapServer 4.5? Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From steve.lime at DNR.STATE.MN.US Tue Feb 1 19:58:30 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue Message-ID: Agree'd, I see the problem says the blind man, yuck. Using the FILTER mechanism will be *much* more efficient. Perhaps we could implement a driver specific MapServer expression to native expression translators. The WFS code could stay "as is" for the most part but using FILTER with the translator called in msQueryUsingAttributes... Just a thought. Steve >>> Yewondwossen Assefa 02/01/05 2:11 PM >>> Frank Warmerdam wrote: > On Tue, 01 Feb 2005 13:34:47 -0500, Yewondwossen Assefa > wrote: > >>Just some info on how the WFS GetFeature with is done >>internally in mapserver : >> the part is transformed into mapserver class expressions and >>then a normal spatial query (querybyrect or querybypoint) is performed. > > > Assefa, > > When you say it is turned into a mapserver class expression, where > it is set? Is a CLASS setup on the layer with this as it's EXPRESSION? > Does the WFS code then classify all features, and only return those > matching this query class? > Yes : I meant the class's object expression is the one used. Once the class expression's are set, a regular mapserver spatial query is called. Inside the query code there is a checking performed to see if a "candidate" feature (element inside the spatial query) meets one of the classe's expressions and if that is the case, this element is selected. The WFS code will then output the selected features. > Would it make sense to try and use the layer level filter? > > As implemented now, aren't we pretty much trapped into evaluating > all features withi mapserver instead of allowing underlying RDBMS's > to do the attribute searches quickly? Is this how we will be leaving > things indefinately? > > I am concerned that it is very hard for folks with large datasets in > a database to take advantage of some of MapServers features > efficiently when we just fallback to reading everything and evaluating > alots of stuff in MapServer. > I understand your concern. Using the layer filter would be appropriate but custum code would be necessary for diffrent type of drivers. I am willing to rework the WFS part of the code if peopole are willing to proivide help in testing the diffrent formats ( I do not have access to Oracle or even PostGIS locally so testing will be a bit difficult). I think, we should maybe move this discussion to a bug and work the details through it. > >>If the is soemhow complex (ex It contains several spatial >>queries plus attribute queries), the is broken into several >>small pieces and then queries are done for each piece and the results >>are merged to provide the final set of results. > > > Whew, that must have been a bit of work. > > Best regards, -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From steve.lime at DNR.STATE.MN.US Tue Feb 1 21:18:50 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue Message-ID: I should add that since WCS could use this as well since you can develop FILTERs against non-shapefile tileindex layers too. Steve >>> Steve Lime 02/01/05 6:58 PM >>> Agree'd, I see the problem says the blind man, yuck. Using the FILTER mechanism will be *much* more efficient. Perhaps we could implement a driver specific MapServer expression to native expression translators. The WFS code could stay "as is" for the most part but using FILTER with the translator called in msQueryUsingAttributes... Just a thought. Steve >>> Yewondwossen Assefa 02/01/05 2:11 PM >>> Frank Warmerdam wrote: > On Tue, 01 Feb 2005 13:34:47 -0500, Yewondwossen Assefa > wrote: > >>Just some info on how the WFS GetFeature with is done >>internally in mapserver : >> the part is transformed into mapserver class expressions and >>then a normal spatial query (querybyrect or querybypoint) is performed. > > > Assefa, > > When you say it is turned into a mapserver class expression, where > it is set? Is a CLASS setup on the layer with this as it's EXPRESSION? > Does the WFS code then classify all features, and only return those > matching this query class? > Yes : I meant the class's object expression is the one used. Once the class expression's are set, a regular mapserver spatial query is called. Inside the query code there is a checking performed to see if a "candidate" feature (element inside the spatial query) meets one of the classe's expressions and if that is the case, this element is selected. The WFS code will then output the selected features. > Would it make sense to try and use the layer level filter? > > As implemented now, aren't we pretty much trapped into evaluating > all features withi mapserver instead of allowing underlying RDBMS's > to do the attribute searches quickly? Is this how we will be leaving > things indefinately? > > I am concerned that it is very hard for folks with large datasets in > a database to take advantage of some of MapServers features > efficiently when we just fallback to reading everything and evaluating > alots of stuff in MapServer. > I understand your concern. Using the layer filter would be appropriate but custum code would be necessary for diffrent type of drivers. I am willing to rework the WFS part of the code if peopole are willing to proivide help in testing the diffrent formats ( I do not have access to Oracle or even PostGIS locally so testing will be a bit difficult). I think, we should maybe move this discussion to a bug and work the details through it. > >>If the is soemhow complex (ex It contains several spatial >>queries plus attribute queries), the is broken into several >>small pieces and then queries are done for each piece and the results >>are merged to provide the final set of results. > > > Whew, that must have been a bit of work. > > Best regards, -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From arnulf.christl at CCGIS.DE Wed Feb 2 08:08:14 2005 From: arnulf.christl at CCGIS.DE (Arnulf Christl (CCGIS)) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue In-Reply-To: Message-ID: Hi, had a littel listserv problem, but it seems like i receive dev mails now too. Please confirm whether I got this right: All WFS request going through MapServer get a spatial filter prior to asking the database. If I select a region thats fine, because then I explicitly specify a bbox. But this does not make sense if the query is non-spatial for alphanumerical data only. This featurebug only develops into a real problem when the underlying data gets large. What happens if I don't specifically set a spatial filter? MapServer probably defaults to the WFS_EXTENT of the MAP file - is that true? I could set a tiny little bbox in the wfs_extent as a workaround - but then objects only within that region could be found? Any faults in my thinking? Asseffa we have several PG/PostGIS running on FreeBSD, Debian, SuSE and Mandrake, just recently we added a PG 8.0 for Windoze (runs fine, PostGIS even is an option in the setup - cool thing!). Oracle is a license, version, maintenance (and pain) problem. But we have several customers who use it and might let us do some testing. For the problem at hand it wouldn't even make a difference, because both databases show the same performance problem. Tell us what you need to get tested. Best Arnulf. From Tom.Kralidis at EC.GC.CA Wed Feb 2 17:39:00 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: FW: [UMN_MAPSERVER-USERS] FW: [postgis-users] About Invalid OGC WKT Error Message-ID: FYI below. Thought I'd send this to the dev list as well, as this might mean changes to the code in how it access PostGIS 1.0.0. I've tested this out and can fetch the table schema (WFS DescribeFeatureType) but cannot fetch data (GetFeature). I'm banging my head on this one :) ..Tom -----Original Message----- From: UMN MapServer Users List [mailto:MAPSERVER-USERS@lists.umn.edu] On Behalf Of Kralidis,Tom [Burlington] Sent: Wednesday, 02 February, 2005 13:09 To: MAPSERVER-USERS@lists.umn.edu Subject: [UMN_MAPSERVER-USERS] FW: [postgis-users] About Invalid OGC WKT Error Hi, FYI below. Does this have any bearing on how we use MapServer to connect to PostGIS? I'm am trying to connect MapServer CVS (layer to a postgis connection) with the following defs: CONNECTIONTYPE postgis CONNECTION "user=postgres dbname=devgeodb" DATA "the_geom from service_endpoints" ...and get no data back. ..Tom -----Original Message----- From: postgis-users-bounces@postgis.refractions.net [mailto:postgis-users-bounces@postgis.refractions.net] On Behalf Of Markus Schaber Sent: Wednesday, 02 February, 2005 12:26 To: PostGIS Users Discussion Subject: Re: [postgis-users] About Invalid OGC WKT Error Hi, Koji, Koji Yano schrieb: > Example2: I ran shp2pgsql and imported some shape files successfully. > When I use only 'Select the_geom', I got a result like > 0106000020E610000001000000010300000001000000660000009C9FD6D... This is caused by the change of the canonical representation in PostGIS 1.0. All applications that use PostGIS specific ways to acces the GIS data instead of standard OpenGIS methods will have to be fixed to work with PostGIS 1.0. HTH, Markus -- markus schaber | dipl. informatiker logi-track ag | rennweg 14-16 | ch 8001 z?rich phone +41-43-888 62 52 | fax +41-43-888 62 53 mailto:schabios@logi-track.com | www.logi-track.com _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users From pere at HUNGRY.COM Wed Feb 2 17:37:44 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:42 2008 Subject: Compile time assertions Message-ID: In the November 2004 issue of the C/C++ Users Journal, there is a nice article on "Compile-Time Assertions" by Ralf Holly. He explain the consept of asserts what trigger error at compile time if the assert expression is failse, and go through a number of examples. The point of such asserts are to document assumsions done in the code in such a way that the compiler will report if the assumsions no longer holds, instead of waiting until the program is executed (like normal asserts do). If the code assume the 'char' type is signed, it could be documented with code like this: assert_static(-1 == (char)-1); Or, if one assume the sizeof(int) equals the sizeof(void*), one could document it in the code like this: assert_static(sizeof(int) == sizeof(void*)); The article lists several ways to implement such compile time assert. Here are the examples, if the order they are presented in the article: #if 0 #define assert_static(e) 1/(e) #elif 0 #define assert_static(e) switch(0){case 0: case (e):;} #elif 0 #define assert_static(e) { char assert_static__[(e) ? 1 : -1];} #else #define assert_static(e) do{enum{ assert_static__ = 1/(e)};}while (0) #endif Would it be an idea to introduce such asserts into the mapserver code, and use it to document and enforce the assumtions used by the programmer? The background for this question is the observation that the code for example seem to assume that 'char' is an signed type, while ANSI C89 do not garantee this. I discovered this assumsion when resultCacheMemberObj.classindex was compared with 0 (classindex > 0), and the compiler I used at the time complained that this test would always be true. The same compiler would refuse to compile code containing 'assert_static(-1 == (char)-1);', so the problem would be detected at compile time instead of at run time. From Tom.Kralidis at EC.GC.CA Thu Feb 3 11:13:28 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: configure issue with debug Message-ID: Hi, I have a requirement to compile MapServer with debugging turned on, so I tried running ./configure with --enable-debug=yes, and got the following error: checking compiler warnings... basic configure: checking whether we should enable debug features... expr: syntax error ./configure: line 10130: test: too many arguments Enabling debug features: -g in CFLAGS and msDebug() to stderr (-DENABLE_STDERR_DEBUG). I went ahead and ran make and all went fine, though. With debugging turned on. ..Tom From Tom.Kralidis at EC.GC.CA Thu Feb 3 12:13:26 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: configure issue with debug Message-ID: > -----Original Message----- > From: Frank Warmerdam [mailto:fwarmerdam@gmail.com] > Sent: Thursday, 03 February, 2005 12:11 > To: Kralidis,Tom [Burlington] > Cc: MAPSERVER-DEV@lists.umn.edu > Subject: Re: [UMN_MAPSERVER-DEV] configure issue with debug > > > On Thu, 3 Feb 2005 11:13:28 -0500, Kralidis,Tom [Burlington] > wrote: > > Hi, > > > > I have a requirement to compile MapServer with debugging > turned on, so > > I tried running ./configure with --enable-debug=yes, and got the > > following > > error: > > > > > > checking compiler warnings... basic > > configure: checking whether we should enable debug features... > > expr: syntax error > > ./configure: line 10130: test: too many arguments > > Enabling debug features: -g in CFLAGS and msDebug() > to stderr > > (-DENABLE_STDERR_DEBUG). > > Tom, > > I believe that --enable / --disable directives to configure > are not supposed to have any arguments. So just use --enable-debug. > I get the exact same error when I use --enable-debug. - MapServer CVS - Linux FC2 ..Tom From fwarmerdam at GMAIL.COM Thu Feb 3 12:10:46 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:42 2008 Subject: configure issue with debug In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F536@ecnwri1.ontario.int.ec.gc.ca> Message-ID: On Thu, 3 Feb 2005 11:13:28 -0500, Kralidis,Tom [Burlington] wrote: > Hi, > > I have a requirement to compile MapServer with debugging turned on, so I > tried running ./configure with --enable-debug=yes, and got the following > error: > > > checking compiler warnings... basic > configure: checking whether we should enable debug features... > expr: syntax error > ./configure: line 10130: test: too many arguments > Enabling debug features: -g in CFLAGS and msDebug() to stderr > (-DENABLE_STDERR_DEBUG). > Tom, I believe that --enable / --disable directives to configure are not supposed to have any arguments. So just use --enable-debug. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From Tom.Kralidis at EC.GC.CA Thu Feb 3 12:44:14 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: mappostgis.c and PostGIS 1.0.0 Message-ID: Hi, I've been trying for between mapserver-users and postgis-users to figure this one out (I'm starting to feel like one of thoese guys). Has anyone successfully tested MapServer CVS with PostGIS 1.0.0RC2? I'm trying to do this, and after much debugging and testing, it looks like the MapServer code needs to be updated for the new PostGIS dist. Test: Here is what's been done successfully: - configure PostGIS DB - insert sample data - fetch sample data via psql - configure mapfile to connect with the following: CONNECTIONTYPE postgis CONNECTION "user=postgres dbname=devgeodb" DATA "the_geom from service_resources" - Run OGC:WFS GetCapabilities - Run OGC:WFS DescribeFeatureType - response as expected, I can see the table schema via XML output ...when I go to run GetFeature, no data comes back. DescribeFeatureType works, so I know the connection is ok. I'm wondering if the data fetching bindings in PostGIS 1.0.0RC2 have changed, and if MapServer needs to update these. I'm miffed. ..Tom From jerry.pisk at GMAIL.COM Thu Feb 3 12:52:31 2005 From: jerry.pisk at GMAIL.COM (Jerry Pisk) Date: Fri Feb 8 14:55:42 2008 Subject: mappostgis.c and PostGIS 1.0.0 In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F53A@ecnwri1.ontario.int.ec.gc.ca> Message-ID: I am using mapserver with PostGIS 1.0RC1 and it's working just fine. But I am only using query and draw features and those are using OpenGIS Well Known Binary formats. Jerry On Thu, 3 Feb 2005 12:44:14 -0500, Kralidis,Tom [Burlington] wrote: > Hi, > > I've been trying for between mapserver-users and postgis-users to figure > this one out (I'm starting to feel like one of thoese guys). > > Has anyone successfully tested MapServer CVS with PostGIS 1.0.0RC2? I'm > trying to do this, and after much debugging and testing, it looks like > the MapServer code needs to be updated for the new PostGIS dist. > > Test: > > Here is what's been done successfully: > > - configure PostGIS DB > - insert sample data > - fetch sample data via psql > - configure mapfile to connect with the following: > > CONNECTIONTYPE postgis > CONNECTION "user=postgres dbname=devgeodb" > DATA "the_geom from service_resources" > > - Run OGC:WFS GetCapabilities > - Run OGC:WFS DescribeFeatureType > - response as expected, I can see the table schema via XML output > > ...when I go to run GetFeature, no data comes back. DescribeFeatureType > works, so I know the connection is ok. I'm wondering if the data > fetching bindings in PostGIS 1.0.0RC2 have changed, and if MapServer > needs to update these. > > I'm miffed. > > ..Tom > From Tom.Kralidis at EC.GC.CA Thu Feb 3 13:08:25 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: mappostgis.c and PostGIS 1.0.0 Message-ID: > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Jerry Pisk > Sent: Thursday, 03 February, 2005 12:53 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] mappostgis.c and PostGIS 1.0.0 > > > I am using mapserver with PostGIS 1.0RC1 and it's working > just fine. But I am only using query and draw features and > those are using OpenGIS Well Known Binary formats. > What do you mean "those are using OpenGIS Well Known Binary formats."? > Jerry > > On Thu, 3 Feb 2005 12:44:14 -0500, Kralidis,Tom [Burlington] > wrote: > > Hi, > > > > I've been trying for between mapserver-users and postgis-users to > > figure this one out (I'm starting to feel like one of thoese guys). > > > > Has anyone successfully tested MapServer CVS with PostGIS > 1.0.0RC2? > > I'm trying to do this, and after much debugging and > testing, it looks > > like the MapServer code needs to be updated for the new > PostGIS dist. > > > > Test: > > > > Here is what's been done successfully: > > > > - configure PostGIS DB > > - insert sample data > > - fetch sample data via psql > > - configure mapfile to connect with the following: > > > > CONNECTIONTYPE postgis > > CONNECTION "user=postgres dbname=devgeodb" > > DATA "the_geom from service_resources" > > > > - Run OGC:WFS GetCapabilities > > - Run OGC:WFS DescribeFeatureType > > - response as expected, I can see the table schema via XML output > > > > ...when I go to run GetFeature, no data comes back. > > DescribeFeatureType works, so I know the connection is ok. I'm > > wondering if the data fetching bindings in PostGIS 1.0.0RC2 have > > changed, and if MapServer needs to update these. > > > > I'm miffed. > > > > ..Tom > > > From pramsey at REFRACTIONS.NET Thu Feb 3 13:44:12 2005 From: pramsey at REFRACTIONS.NET (Paul Ramsey) Date: Fri Feb 8 14:55:42 2008 Subject: mappostgis.c and PostGIS 1.0.0 In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F53A@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Has anyone tried mapserver as a WFS against PostGIS of any version? I have been trying to figure out how the s are applied against database backends, perhaps something I can do as I loll about in bed this afternoon, but it was not immediately clear to me. That said, I guess you were also having problems with WMS, right Tom? P Kralidis,Tom [Burlington] wrote: > I've been trying for between mapserver-users and postgis-users to figure > this one out (I'm starting to feel like one of thoese guys). > > Has anyone successfully tested MapServer CVS with PostGIS 1.0.0RC2? I'm > trying to do this, and after much debugging and testing, it looks like > the MapServer code needs to be updated for the new PostGIS dist. > > Test: > > Here is what's been done successfully: > > - configure PostGIS DB > - insert sample data > - fetch sample data via psql > - configure mapfile to connect with the following: > > CONNECTIONTYPE postgis > CONNECTION "user=postgres dbname=devgeodb" > DATA "the_geom from service_resources" > > - Run OGC:WFS GetCapabilities > - Run OGC:WFS DescribeFeatureType > - response as expected, I can see the table schema via XML output > > ...when I go to run GetFeature, no data comes back. DescribeFeatureType > works, so I know the connection is ok. I'm wondering if the data > fetching bindings in PostGIS 1.0.0RC2 have changed, and if MapServer > needs to update these. > > I'm miffed. > > ..Tom From bartvde at XS4ALL.NL Thu Feb 3 13:57:14 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri Feb 8 14:55:42 2008 Subject: mappostgis.c and PostGIS 1.0.0 In-Reply-To: <420270FC.9030007@refractions.net> Message-ID: Hi Paul, with Mapserver 4.4.1 and Postgis 0.8 I get: [Thu Feb 03 19:57:02 2005] [error] [client 192.168.3.4] Premature end of script headers: mapserv.exe [Thu Feb 03 19:57:02 2005] [error] [client 192.168.3.4] Thu Feb 03 19:57:01 2005 - msAddLine(): Memory allocation error. \r WMS works fine, WFS GetFeature fails. WFS DescribeFeatureType works. Best regards, Bart On Thu, 3 Feb 2005 10:44:12 -0800, Paul Ramsey wrote: > Has anyone tried mapserver as a WFS against PostGIS of any version? I > have been trying to figure out how the s are applied against > database backends, perhaps something I can do as I loll about in bed > this afternoon, but it was not immediately clear to me. > > That said, I guess you were also having problems with WMS, right Tom? > > P > > Kralidis,Tom [Burlington] wrote: > >> I've been trying for between mapserver-users and postgis-users to figure >> this one out (I'm starting to feel like one of thoese guys). >> >> Has anyone successfully tested MapServer CVS with PostGIS 1.0.0RC2? I'm >> trying to do this, and after much debugging and testing, it looks like >> the MapServer code needs to be updated for the new PostGIS dist. >> >> Test: >> >> Here is what's been done successfully: >> >> - configure PostGIS DB >> - insert sample data >> - fetch sample data via psql >> - configure mapfile to connect with the following: >> >> CONNECTIONTYPE postgis >> CONNECTION "user=postgres dbname=devgeodb" >> DATA "the_geom from service_resources" >> >> - Run OGC:WFS GetCapabilities >> - Run OGC:WFS DescribeFeatureType >> - response as expected, I can see the table schema via XML output >> >> ...when I go to run GetFeature, no data comes back. DescribeFeatureType >> works, so I know the connection is ok. I'm wondering if the data >> fetching bindings in PostGIS 1.0.0RC2 have changed, and if MapServer >> needs to update these. >> >> I'm miffed. >> >> ..Tom > -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From Tom.Kralidis at EC.GC.CA Thu Feb 3 14:33:44 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: mappostgis.c and PostGIS 1.0.0 Message-ID: Hi, Yes, WMS doesn't work either for me. MapServer CVS PostGIS 1.0.0RC2 Linux Fedora Core ..Tom > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Paul Ramsey > Sent: Thursday, 03 February, 2005 13:44 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] mappostgis.c and PostGIS 1.0.0 > > > Has anyone tried mapserver as a WFS against PostGIS of any > version? I have been trying to figure out how the s > are applied against database backends, perhaps something I > can do as I loll about in bed this afternoon, but it was not > immediately clear to me. > > That said, I guess you were also having problems with WMS, right Tom? > > P > > Kralidis,Tom [Burlington] wrote: > > > I've been trying for between mapserver-users and postgis-users to > > figure this one out (I'm starting to feel like one of thoese guys). > > > > Has anyone successfully tested MapServer CVS with PostGIS > 1.0.0RC2? > > I'm trying to do this, and after much debugging and > testing, it looks > > like the MapServer code needs to be updated for the new > PostGIS dist. > > > > Test: > > > > Here is what's been done successfully: > > > > - configure PostGIS DB > > - insert sample data > > - fetch sample data via psql > > - configure mapfile to connect with the following: > > > > CONNECTIONTYPE postgis > > CONNECTION "user=postgres dbname=devgeodb" > > DATA "the_geom from service_resources" > > > > - Run OGC:WFS GetCapabilities > > - Run OGC:WFS DescribeFeatureType > > - response as expected, I can see the table schema via XML output > > > > ...when I go to run GetFeature, no data comes back. > > DescribeFeatureType works, so I know the connection is ok. I'm > > wondering if the data fetching bindings in PostGIS 1.0.0RC2 have > > changed, and if MapServer needs to update these. > > > > I'm miffed. > > > > ..Tom > From Tom.Kralidis at EC.GC.CA Thu Feb 3 14:40:23 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:42 2008 Subject: mappostgis.c and PostGIS 1.0.0 Message-ID: WMS doesn't even work for me. Something's telling me that somethings's up with the data fetching for MapServer to PostGIS 1.0.0 connections. ..Tom > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Bart van den Eijnden > Sent: Thursday, 03 February, 2005 13:57 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] mappostgis.c and PostGIS 1.0.0 > > > Hi Paul, > > with Mapserver 4.4.1 and Postgis 0.8 I get: > > [Thu Feb 03 19:57:02 2005] [error] [client 192.168.3.4] > Premature end of script headers: mapserv.exe [Thu Feb 03 > 19:57:02 2005] [error] [client 192.168.3.4] Thu Feb 03 > 19:57:01 2005 - msAddLine(): Memory allocation error. \r > > WMS works fine, WFS GetFeature fails. WFS DescribeFeatureType works. > > Best regards, > Bart > > On Thu, 3 Feb 2005 10:44:12 -0800, Paul Ramsey > > wrote: > > > Has anyone tried mapserver as a WFS against PostGIS of any > version? I > > have been trying to figure out how the s are > applied against > > database backends, perhaps something I can do as I loll > about in bed > > this afternoon, but it was not immediately clear to me. > > > > That said, I guess you were also having problems with WMS, > right Tom? > > > > P > > > > Kralidis,Tom [Burlington] wrote: > > > >> I've been trying for between mapserver-users and postgis-users to > >> figure this one out (I'm starting to feel like one of thoese guys). > >> > >> Has anyone successfully tested MapServer CVS with PostGIS > 1.0.0RC2? > >> I'm trying to do this, and after much debugging and > testing, it looks > >> like the MapServer code needs to be updated for the new > PostGIS dist. > >> > >> Test: > >> > >> Here is what's been done successfully: > >> > >> - configure PostGIS DB > >> - insert sample data > >> - fetch sample data via psql > >> - configure mapfile to connect with the following: > >> > >> CONNECTIONTYPE postgis > >> CONNECTION "user=postgres dbname=devgeodb" > >> DATA "the_geom from service_resources" > >> > >> - Run OGC:WFS GetCapabilities > >> - Run OGC:WFS DescribeFeatureType > >> - response as expected, I can see the table schema via XML output > >> > >> ...when I go to run GetFeature, no data comes back. > >> DescribeFeatureType works, so I know the connection is ok. I'm > >> wondering if the data fetching bindings in PostGIS 1.0.0RC2 have > >> changed, and if MapServer needs to update these. > >> > >> I'm miffed. > >> > >> ..Tom > > > > > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > From pere at HUNGRY.COM Thu Feb 3 18:07:10 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:42 2008 Subject: configure issue with debug In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F536@ecnwri1.ontario.int.ec.gc.ca> Message-ID: [Kralidis,Tom] > configure: checking whether we should enable debug features... > expr: syntax error > ./configure: line 10130: test: too many arguments This problem is triggered by missing quotes around the apache variables. I posted a patch to fix this to the list a few days ago. From steve.lime at DNR.STATE.MN.US Thu Feb 3 20:44:56 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:42 2008 Subject: WFS performance issue Message-ID: Welcome to mapserver-dev. I'm just confirming a few things. "This featurebug only develops into a real problem when the underlying data gets large." Actually the fact that a spatial filter is applied first isn't the problem. If it falls back on the extent set in the mapfile that's just setting all features as potential candidates which is what you want. The problem is the fact that there are lots of features and the WFS implementation isn't using the underlying database. MapServer is forced to loop through all the features- yuck. Frank posted a seperate message with a proposed solution but it will only help if the WFS code is changed. "What happens if I don't specifically set a spatial filter? MapServer probably defaults to the WFS_EXTENT of the MAP file - is that true? I could set a tiny little bbox in the wfs_extent as a workaround - but then objects only within that region could be found? Any faults in my thinking?" True. Again not setting the spatial filter and having the extent cover all features is what you want. Query optimization is what not setting a spatial extent might get you. For shapefiles, for example, that would have little effect on performance. The performance fix is writing native FILTERs based on WFS input. Steve >>> "Arnulf Christl (CCGIS)" 02/02/05 7:08 AM >>> Hi, had a littel listserv problem, but it seems like i receive dev mails now too. Please confirm whether I got this right: All WFS request going through MapServer get a spatial filter prior to asking the database. If I select a region thats fine, because then I explicitly specify a bbox. But this does not make sense if the query is non-spatial for alphanumerical data only. This featurebug only develops into a real problem when the underlying data gets large. What happens if I don't specifically set a spatial filter? MapServer probably defaults to the WFS_EXTENT of the MAP file - is that true? I could set a tiny little bbox in the wfs_extent as a workaround - but then objects only within that region could be found? Any faults in my thinking? Asseffa we have several PG/PostGIS running on FreeBSD, Debian, SuSE and Mandrake, just recently we added a PG 8.0 for Windoze (runs fine, PostGIS even is an option in the setup - cool thing!). Oracle is a license, version, maintenance (and pain) problem. But we have several customers who use it and might let us do some testing. For the problem at hand it wouldn't even make a difference, because both databases show the same performance problem. Tell us what you need to get tested. Best Arnulf. From arnulf.christl at CCGIS.DE Fri Feb 4 08:46:45 2005 From: arnulf.christl at CCGIS.DE (Arnulf Christl) Date: Fri Feb 8 14:55:42 2008 Subject: mappostgis.c and PostGIS 1.0.0 In-Reply-To: <420270FC.9030007@refractions.net> Message-ID: Paul Ramsey wrote: > Has anyone tried mapserver as a WFS against PostGIS of any version? I > have been trying to figure out how the s are applied against > database backends, perhaps something I can do as I loll about in bed > this afternoon, but it was not immediately clear to me. > > That said, I guess you were also having problems with WMS, right Tom? > > P We have a PostGIS 0.9 on FreeBSD with MapServer 411 running as WMS and WFS on the same data. http://www.mapbender.org/demoserver.html Both Capabilities, getMap, getFeatureInfo, DescribeFeature, getFeature are fine. We can provide a MAP file including data sql dump and shape. Works fine for post codes (we just shreddered the placenames tbale in the database so the city search wont work). What do you want to know about it? We'll get a PostGIS v1 up and running asap - I missed that its out already (are you reading this Ben?). What am I doing the whole time? Must be lolling around in bed while the rest of the world is working hard... I always thought it was me who is too slow - did it ever cross anybodys mind that we/you/MapServer dev could be 2fast4anybody? Arnulf. > > Kralidis,Tom [Burlington] wrote: > >> I've been trying for between mapserver-users and postgis-users to figure >> this one out (I'm starting to feel like one of thoese guys). >> >> Has anyone successfully tested MapServer CVS with PostGIS 1.0.0RC2? I'm >> trying to do this, and after much debugging and testing, it looks like >> the MapServer code needs to be updated for the new PostGIS dist. >> >> Test: >> >> Here is what's been done successfully: >> >> - configure PostGIS DB >> - insert sample data >> - fetch sample data via psql >> - configure mapfile to connect with the following: >> >> CONNECTIONTYPE postgis >> CONNECTION "user=postgres dbname=devgeodb" >> DATA "the_geom from service_resources" >> >> - Run OGC:WFS GetCapabilities >> - Run OGC:WFS DescribeFeatureType >> - response as expected, I can see the table schema via XML output >> >> ...when I go to run GetFeature, no data comes back. DescribeFeatureType >> works, so I know the connection is ok. I'm wondering if the data >> fetching bindings in PostGIS 1.0.0RC2 have changed, and if MapServer >> needs to update these. >> >> I'm miffed. >> >> ..Tom > > -- ------------------------ Arnulf B. Christl ------------------------ http://www.ccgis.org http://www.mapbender.org ------------------------ From pere at HUNGRY.COM Sat Feb 5 05:00:55 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:42 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: (Steve Lime's message of "Tue, 1 Feb 2005 10:50:51 -0600") Message-ID: [Steve Lime] > Hi Petter: Certainly intended to send to the whole list, slip of the > mouse (CC'ing now). After doing a bit of reading after your initial > posting I agree that that ANSI C C89 makes the most logical target > at this point in time. OK. This will make it easier to know if the code issues I find are correct or not. Am I correct when I believe the code also assume 'char' is a signed type? This is undefined in C89, so the code need to be changed to use 'signed char' or 'int8_t' (from ) to make sure the code work on all C89-compatible compilers. The type is signed on i386 archs, and several others as well, and this is the reason I suspect the code assume 'char' to always be signed. The code I recently found with this problem was the 'char classindex' member of resultCacheMemberObj, which is compared to zero. This test do not make sense with some compilers, and the best way to fix this is to change the type to 'signed char classindex' or 'int8_t classindex' in map.h. I suspect this problem exist elsewhere too, but I haven't been able to locate other problems yet. As for the -ansi and -pedantic flag, I suggest to start using -pedantic to get warnings for non-ANSI constructs, and the move on to include -ansi when the code producing these warnings are fixed to be C89. From pere at HUNGRY.COM Sat Feb 5 16:25:12 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:42 2008 Subject: [PATCH] Fix --disable-runpath configure option Message-ID: While reading through configure.in in CVS, I came across what what seem to me like a cut-n-paste typo. The --disable-runpath configure option do not work, and --enable-debug is implemented twice. I believe this patch implement the intended behaviour. Anyone know if this the correct fix or not? Index: configure.in =================================================================== RCS file: /data2/cvsroot/mapserver/configure.in,v retrieving revision 1.117 diff -u -3 -p -u -r1.117 configure.in --- configure.in 28 Jan 2005 07:13:24 -0000 1.117 +++ configure.in 5 Feb 2005 21:17:04 -0000 @@ -2043,7 +2047,7 @@ dnl Check --enable-runpath to request in dnl lib path in link command (disabled by default) dnl --------------------------------------------------------------------- -AC_ARG_ENABLE(debug, +AC_ARG_ENABLE(runpath, [ --enable-runpath Include runtime library path flags (-Wl,-R) in link. Required on *BSD systems. --disable-runpath Do not link with runtime lib path (the default).],,) From pere at HUNGRY.COM Sat Feb 5 17:20:31 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:43 2008 Subject: Automatic coverage testing of mapserv? In-Reply-To: <931f8ea905012720591a002a23@mail.gmail.com> (Frank Warmerdam's message of "Thu, 27 Jan 2005 23:59:16 -0500") Message-ID: [Frank Warmerdam] > In addition to Sean's mapscript based unit test, Where is this? Are you talking about the stuff in mapserver/tests/? > I also maintain a test suite that can be run automatically. They > can be checked out of CVS as "msautotest". There is a topic in the > wiki that discusses the msautotest series. This look like a very good starting point. I'm investigating it now. One thing that surprised me was the fact that you seem to be using a home made test suite system instead of using the official one included in python. Why is this? Unless you have a very good reason, I suggest we rewrite it to use the unittest python module, . This will give us the system to run all tests at once and give a summary at the end of all these tests. > Rather than starting yet another completely different test methology > I would encourage you to look at adding into msauotest. I'm sure a > "mapserv QUERY_STRING=... " style test would fit into it quite > naturally, and I would be willing to cooperate on it. Yes, this look like a better starting point that the mapserver/tests/ scripts, and I will start here. I'll start by trying to understand the current tests, and see how much code coverage they provide. This patch will make it easier to enable coverage testing using a new --enable-coverage configure flag. Index: configure.in =================================================================== RCS file: /data2/cvsroot/mapserver/configure.in,v retrieving revision 1.117 diff -u -3 -p -u -r1.117 configure.in --- configure.in 28 Jan 2005 07:13:24 -0000 1.117 +++ configure.in 5 Feb 2005 22:14:24 -0000 @@ -1773,6 +1773,10 @@ fi AC_SUBST(DEBUG_FLAGS, $DEBUG_FLAGS) ALL_ENABLED="$DEBUG_FLAGS $ALL_ENABLED" +AC_ARG_ENABLE(coverage, +[ --enable-coverage Enable coverage testing], +[CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"]) + dnl --------------------------------------------------------------------- dnl PHP/MapScript module options dnl --------------------------------------------------------------------- From sgillies at FRII.COM Sat Feb 5 18:29:23 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri Feb 8 14:55:43 2008 Subject: Automatic coverage testing of mapserv? In-Reply-To: Message-ID: On Feb 5, 2005, at 3:20 PM, Petter Reinholdtsen wrote: > [Frank Warmerdam] >> In addition to Sean's mapscript based unit test, > > Where is this? Are you talking about the stuff in mapserver/tests/? > Lightweight testing data is in mapserver/tests. The unit tests are under mapserver/mapscript/python/tests. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From Tom.Kralidis at EC.GC.CA Sat Feb 5 20:55:26 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:43 2008 Subject: new libcurl Message-ID: FYI version 7.13.0 is out (01 Feb 2005). http://curl.haxx.se/ I haven't upgraded to this myself (from 7.12.3). Changes: http://curl.haxx.se/changes.html. Not sure if there's any changes that will be a showstopper to MapServer. Cheers ..Tom From fwarmerdam at GMAIL.COM Sat Feb 5 23:07:02 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:43 2008 Subject: Automatic coverage testing of mapserv? In-Reply-To: <2flr7juabtc.fsf@saruman.uio.no> Message-ID: On Sat, 5 Feb 2005 23:20:31 +0100, Petter Reinholdtsen wrote: > [Frank Warmerdam] > > In addition to Sean's mapscript based unit test, > > Where is this? Are you talking about the stuff in mapserver/tests/? Petter, Sean already mentioned where his unit tests are. I am not honestly sure what the mapserver/tests directory is for. > This look like a very good starting point. I'm investigating it now. > One thing that surprised me was the fact that you seem to be using a > home made test suite system instead of using the official one included > in python. Why is this? Unless you have a very good reason, I > suggest we rewrite it to use the unittest python module, > . This will give > us the system to run all tests at once and give a summary at the end > of all these tests. I am not interested in changing it without a fairly compelling reason. Hopefully we will have a chance to meet and share a few beers at MUM3, and I can do my full "grumpy old man" routine where I berate you for wanting to change everything. Sort of like I did with Sean last year. I believe that Sean has used the python unittest stuff. > > Rather than starting yet another completely different test methology > > I would encourage you to look at adding into msauotest. I'm sure a > > "mapserv QUERY_STRING=... " style test would fit into it quite > > naturally, and I would be willing to cooperate on it. > > Yes, this look like a better starting point that the mapserver/tests/ > scripts, and I will start here. I'll start by trying to understand > the current tests, and see how much code coverage they provide. > > This patch will make it easier to enable coverage testing using a new > --enable-coverage configure flag. I don't know if someone else is picking up on all your patches, but I'm not applying them. I will apply any that seem sensible to me if they are submitted properly through bugzilla and end up assigned to me. That is our methodology. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From fwarmerdam at GMAIL.COM Sat Feb 5 23:59:22 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:43 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: <2fl6517ba20.fsf@saruman.uio.no> Message-ID: On Sat, 5 Feb 2005 11:00:55 +0100, Petter Reinholdtsen wrote: > Am I correct when I believe the code also assume 'char' is a signed > type? This is undefined in C89, so the code need to be changed to use > 'signed char' or 'int8_t' (from ) to make sure the code > work on all C89-compatible compilers. The type is signed on i386 > archs, and several others as well, and this is the reason I suspect > the code assume 'char' to always be signed. The code I recently found > with this problem was the 'char classindex' member of > resultCacheMemberObj, which is compared to zero. This test do not > make sense with some compilers, and the best way to fix this is to > change the type to 'signed char classindex' or 'int8_t classindex' in > map.h. I suspect this problem exist elsewhere too, but I haven't been > able to locate other problems yet. Petter, My thinking is that we should not be using signed chars for class indexes anyways. We don't want to restrict ourselves to 128 classes. Perhaps the code in question should just be using short or int for class index. I notice that in other places (such as labelCacheMemberObj) the classindex is an int. That is certainly what I have used in the raster code. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From pere at HUNGRY.COM Sun Feb 6 03:04:17 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:43 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: <931f8ea905020520594278dc8d@mail.gmail.com> Message-ID: [Frank Warmerdam] > My thinking is that we should not be using signed chars for class > indexes anyways. We don't want to restrict ourselves to 128 > classes. Perhaps the code in question should just be using short or > int for class index. You might be correct (I do not know the code in question well enough to know if this index might end up above 128), but I would consider it dangerous to change the type to a wider one, as it should change the size of the structure and break compiled programs linked against libmap. > I notice that in other places (such as labelCacheMemberObj) the > classindex is an int. That is certainly what I have used in the > raster code. You are right, almost all other index types are 'int', with the possible exception of tileindex in layerObj. From pere at HUNGRY.COM Sun Feb 6 09:20:42 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:43 2008 Subject: Automatic coverage testing of mapserv? In-Reply-To: <931f8ea90502052007732315dc@mail.gmail.com> (Frank Warmerdam's message of "Sat, 5 Feb 2005 23:07:02 -0500") Message-ID: [Frank Warmerdam] > I am not interested in changing it without a fairly compelling > reason. Well, the reasons I had was to get a system capable of running all the tests at once and reporting the results at the end (also on the todo list on wiki), and to reduce the amount of code in the framework. I've completed a rewrite of the gdal/ and misc/ tests, and need to get a working python mapscript module to be able to test and convert the mspython tests. When this is done, I plan to make a wrapper script to compile the latest source and run the test suite and finally make some report on the test results and the current coverage. When I run the test, slightly more than 20 percent of the code is exercised, and 11 of 58 tests fail (font problems). I'm now trying to add tests to increase the code coverage, but I'm still learning my way and have a hard time figuring out how I map from a unused function/feature to a test feature in the map file. I'll see how far I can get using the shp2img program, and move to the mapserv program when I'm unable to increase the coverage using shp2img. > Hopefully we will have a chance to meet and share a few beers at > MUM3, and I can do my full "grumpy old man" routine where I berate > you for wanting to change everything. Sort of like I did with Sean > last year. I would love to share a few beers and watch your routine. :) Too bad I can't make it to MUM3. I already have a conference scheduled in Spain in May, and in Finland in July, so I will have to tend to my daytime job in June. :) Besides, I do not consider traveling to/past USA borders safe these days, with that current governments lack of respect for human rights and justice. :/ What about joining us at debconf5? > I believe that Sean has used the python unittest stuff. Good. > I don't know if someone else is picking up on all your patches, but > I'm not applying them. I will apply any that seem sensible to me if > they are submitted properly through bugzilla and end up assigned to > me. That is our methodology. So, what is the mailing list for? Am I using the wrong mailing list when I want to get comments on the patches where I am unsure if I understood the intention of the original code? I try to create Bugzilla bugs for the obvious fixes. I know I could do better here, and will try to improve. From sgillies at FRII.COM Sun Feb 6 11:32:13 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri Feb 8 14:55:43 2008 Subject: Automatic coverage testing of mapserv? In-Reply-To: Message-ID: On Feb 5, 2005, at 9:07 PM, Frank Warmerdam wrote: > On Sat, 5 Feb 2005 23:20:31 +0100, Petter Reinholdtsen > wrote: >> [Frank Warmerdam] >>> In addition to Sean's mapscript based unit test, >> >> Where is this? Are you talking about the stuff in mapserver/tests/? > > Petter, > > Sean already mentioned where his unit tests are. > I am not honestly sure what the mapserver/tests directory > is for. > > >> This look like a very good starting point. I'm investigating it now. >> One thing that surprised me was the fact that you seem to be using a >> home made test suite system instead of using the official one included >> in python. Why is this? Unless you have a very good reason, I >> suggest we rewrite it to use the unittest python module, >> . This will give >> us the system to run all tests at once and give a summary at the end >> of all these tests. > > I am not interested in changing it without a fairly compelling > reason. Hopefully we will have a chance to meet and share > a few beers at MUM3, and I can do my full "grumpy old man" > routine where I berate you for wanting to change everything. > Sort of like I did with Sean last year. > LOL! I've seen grumpier :) Sean From dmorissette at DMSOLUTIONS.CA Sun Feb 6 11:55:01 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: new libcurl In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F585@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Kralidis,Tom [Burlington] wrote: > FYI version 7.13.0 is out (01 Feb 2005). > > http://curl.haxx.se/ > > I haven't upgraded to this myself (from 7.12.3). Changes: > http://curl.haxx.se/changes.html. > > Not sure if there's any changes that will be a showstopper to MapServer. > Curl is usually very good for compatibility between versions so I wouldn't be too worried. We started using it around 7.10 and I don't remember ever having to adapt the MapServer code for later versions. If I remember correctly, the only Curl version check that we do is that we require 7.10 as a minimum because we rely on some features that were not there in older releases. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From dmorissette at DMSOLUTIONS.CA Sun Feb 6 12:26:23 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: <20050206080417.GA12186@saruman.uio.no> Message-ID: Petter Reinholdtsen wrote: > > You might be correct (I do not know the code in question well enough > to know if this index might end up above 128), but I would consider it > dangerous to change the type to a wider one, as it should change the > size of the structure and break compiled programs linked against > libmap. > I don't think much effort has ever been taken to keep structures compatible between versions of libmap, so I wouldn't worry too much about that at this point: I don't think anyone expects various versions of libmap to be compatible anyway. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From dmorissette at DMSOLUTIONS.CA Sun Feb 6 12:31:29 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: <20050201222658.GA3980@saruman.uio.no> Message-ID: Petter Reinholdtsen wrote: > [Petter Reinholdtsen] > >>Yes, that would be nice, and I agree completely. But there are some >>fixes left before the code will compile using those flags. :) > > > Here is a start, getting rid of '//' comments in the header files, and > also adding info about which #ifdef an #endif matches. Is anyone keeping track of (and/or addressing) all the patches that Petter sends or are they just getting lost in the list archives? It would definitely be nice to get all those compiler issues resolved, but I'm not sure if anyone has time to deal with and test all those patches... I certainly don't have the time now and won't for a few months. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From dmorissette at DMSOLUTIONS.CA Sun Feb 6 12:51:33 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: Automatic coverage testing of mapserv? In-Reply-To: <129D96DD-70BF-11D9-8833-000D9329D732@frii.com> Message-ID: Sean Gillies wrote: > > Next we need is a project server where the tests can be run nightly. > Hint, hint ... > Agreed, and we might even be able to offer an older machine for this, perhaps later this spring because things are just too crazy for us at the moment. FYI, we currently have a machine that does some automated builds/tests (and much more) internally. I haven't checked the status of this recently, but I believe it runs the msautotest and your Python tests from the latest CVS source daily... or that was the goal anyway. I realize that since the machine is internal it doesn't help you much, but at least you can see that we agree with the idea. Down the road, it would be nice to do something like what Curl does: they have an automated build/test script as part of the source distribution that you can install on any machine to report build results for various platforms. Then the results are automatically compiled at http://curl.haxx.se/auto/ Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From woodbri at SWOODBRIDGE.COM Sun Feb 6 12:53:32 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri Feb 8 14:55:43 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: <42065471.6090900@dmsolutions.ca> Message-ID: I am also concerned that the huge amount of work the Petter is doing needs to get integrated into the source. If there is no one that has the time to integrate these patches, then I think you should seriously consider giving Petter full CVS access so he can check them in his self. Or is the development at some fragile point where these type of changes would be disruptive to other project goals? Petter, It was suggested that you write bugs and attach you patches to them. I hope you picked up on that. It is not everyday that we get someone with the energy and drive that Petter has shown. I don't know Petter except via his posts and they demonstrate a good judgment to ask questions and a maturity about development issues and team work. -Steve W. Daniel Morissette wrote: > Petter Reinholdtsen wrote: > >> [Petter Reinholdtsen] >> >>> Yes, that would be nice, and I agree completely. But there are some >>> fixes left before the code will compile using those flags. :) >> >> >> >> Here is a start, getting rid of '//' comments in the header files, and >> also adding info about which #ifdef an #endif matches. > > > > Is anyone keeping track of (and/or addressing) all the patches that > Petter sends or are they just getting lost in the list archives? > > It would definitely be nice to get all those compiler issues resolved, > but I'm not sure if anyone has time to deal with and test all those > patches... I certainly don't have the time now and won't for a few months. > > Daniel > -- > ------------------------------------------------------------ > Daniel Morissette dmorissette@dmsolutions.ca > DM Solutions Group http://www.dmsolutions.ca/ > ------------------------------------------------------------ > From Tom.Kralidis at EC.GC.CA Sun Feb 6 13:04:20 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:43 2008 Subject: CVS access issues? Message-ID: Hi, Is there an issue with CVS access at all? A couple of us are trying to chase down an issue and need to fetch dist's from ~10 days ago. This works: # CVSROOT=:pserver:cvs@cvs.gis.umn.edu:/data2/cvsroot # export CVSROOT # cvs checkout mapserver This just sits there and hangs: # cvs log mappostgis.c Thanks ..Tom From woodbri at SWOODBRIDGE.COM Sun Feb 6 13:06:00 2005 From: woodbri at SWOODBRIDGE.COM (Stephen Woodbridge) Date: Fri Feb 8 14:55:43 2008 Subject: Automatic coverage testing of mapserv? In-Reply-To: <2flmzuhahxh.fsf@saruman.uio.no> Message-ID: Petter Reinholdtsen wrote: [snip] >>I don't know if someone else is picking up on all your patches, but >>I'm not applying them. I will apply any that seem sensible to me if >>they are submitted properly through bugzilla and end up assigned to >>me. That is our methodology. > > > So, what is the mailing list for? Am I using the wrong mailing list > when I want to get comments on the patches where I am unsure if I > understood the intention of the original code? I try to create > Bugzilla bugs for the obvious fixes. I know I could do better here, > and will try to improve. Petter, I think this is exactly the right list to be using to request information and opinions on the patches. After you get your feedback, you should write a bug and attach the patch, possible modified but the feedback, this way the patches will not get lost, and someone will get assigned to the bug to resolve that is familiar with the sub-system being patched. By the way, thank you for all your efforts, and don't let these Grumpy old guys dampen your spirits :) -Steve W. From sgillies at FRII.COM Sun Feb 6 13:41:10 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri Feb 8 14:55:43 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: Message-ID: I've been agitating for MapServer improvements since 2003 and was given CVS access quite early. Perhaps even prematurely. I've made a lot of changes to mapscript that have not been globally appreciated or approved by other developers, but since MapServer has no roadmap, no development policies and no scope, nobody can veto my work without being a "bad guy". Before we add _another_ developer who has aims to broadly overhaul the source, I suggest we have some discussion and even codification of MapServer's mission, scope, and development policies. I'm not proposing a full blown bureaucracy, just a simple framework that makes it easy to bring new developers onboard and keep everybody rowing in the same general direction whatever that may be. cheers, Sean On Feb 6, 2005, at 10:53 AM, Stephen Woodbridge wrote: > I am also concerned that the huge amount of work the Petter is doing > needs to get integrated into the source. If there is no one that has > the > time to integrate these patches, then I think you should seriously > consider giving Petter full CVS access so he can check them in his > self. > Or is the development at some fragile point where these type of changes > would be disruptive to other project goals? > > Petter, It was suggested that you write bugs and attach you patches to > them. I hope you picked up on that. > > It is not everyday that we get someone with the energy and drive that > Petter has shown. I don't know Petter except via his posts and they > demonstrate a good judgment to ask questions and a maturity about > development issues and team work. > > -Steve W. > > Daniel Morissette wrote: >> Petter Reinholdtsen wrote: >> >>> [Petter Reinholdtsen] >>> >>>> Yes, that would be nice, and I agree completely. But there are some >>>> fixes left before the code will compile using those flags. :) >>> >>> >>> >>> Here is a start, getting rid of '//' comments in the header files, >>> and >>> also adding info about which #ifdef an #endif matches. >> >> >> >> Is anyone keeping track of (and/or addressing) all the patches that >> Petter sends or are they just getting lost in the list archives? >> >> It would definitely be nice to get all those compiler issues resolved, >> but I'm not sure if anyone has time to deal with and test all those >> patches... I certainly don't have the time now and won't for a few >> months. >> >> Daniel >> -- >> ------------------------------------------------------------ >> Daniel Morissette dmorissette@dmsolutions.ca >> DM Solutions Group http://www.dmsolutions.ca/ >> ------------------------------------------------------------ >> > From dmorissette at DMSOLUTIONS.CA Sun Feb 6 13:48:33 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: [PATCH] Avoid warning when no apache version is detected In-Reply-To: Message-ID: Petter Reinholdtsen wrote: > When running configure on a machine without apache, I see the > following warning: > > expr: syntax error > ./configure: line 9342: test: too many arguments > > This patch fixes the problem. > ... I have applied the patch in 4.5 and 4.4.x branches in CVS. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From Tom.Kralidis at EC.GC.CA Sun Feb 6 13:55:49 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:43 2008 Subject: mappostgis.c and PostGIS 1.0.0 Message-ID: Update: There was an issue in the latest patch applied to mappostgis.c which caused these issues. Paul and co. have rolled back the patch and things work as expected. We did find some other interesting issues along the way (to be addressed via Bugzilla). ..Tom > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of > Kralidis,Tom [Burlington] > Sent: Thursday, 03 February, 2005 14:34 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] mappostgis.c and PostGIS 1.0.0 > > > Hi, > > Yes, WMS doesn't work either for me. > > MapServer CVS > PostGIS 1.0.0RC2 > Linux Fedora Core > > ..Tom > > > > -----Original Message----- > > From: UMN MapServer Developers List > > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Paul Ramsey > > Sent: Thursday, 03 February, 2005 13:44 > > To: MAPSERVER-DEV@LISTS.UMN.EDU > > Subject: Re: [UMN_MAPSERVER-DEV] mappostgis.c and PostGIS 1.0.0 > > > > > > Has anyone tried mapserver as a WFS against PostGIS of any > > version? I have been trying to figure out how the s > > are applied against database backends, perhaps something I > > can do as I loll about in bed this afternoon, but it was not > > immediately clear to me. > > > > That said, I guess you were also having problems with WMS, > right Tom? > > > > P > > > > Kralidis,Tom [Burlington] wrote: > > > > > I've been trying for between mapserver-users and postgis-users to > > > figure this one out (I'm starting to feel like one of > thoese guys). > > > > > > Has anyone successfully tested MapServer CVS with PostGIS > > 1.0.0RC2? > > > I'm trying to do this, and after much debugging and > > testing, it looks > > > like the MapServer code needs to be updated for the new > > PostGIS dist. > > > > > > Test: > > > > > > Here is what's been done successfully: > > > > > > - configure PostGIS DB > > > - insert sample data > > > - fetch sample data via psql > > > - configure mapfile to connect with the following: > > > > > > CONNECTIONTYPE postgis > > > CONNECTION "user=postgres dbname=devgeodb" > > > DATA "the_geom from service_resources" > > > > > > - Run OGC:WFS GetCapabilities > > > - Run OGC:WFS DescribeFeatureType > > > - response as expected, I can see the table schema via XML output > > > > > > ...when I go to run GetFeature, no data comes back. > > > DescribeFeatureType works, so I know the connection is ok. I'm > > > wondering if the data fetching bindings in PostGIS 1.0.0RC2 have > > > changed, and if MapServer needs to update these. > > > > > > I'm miffed. > > > > > > ..Tom > > > From dmorissette at DMSOLUTIONS.CA Sun Feb 6 14:08:29 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: CVS access issues? In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F58F@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Kralidis,Tom [Burlington] wrote: > > This just sits there and hangs: > > # cvs log mappostgis.c > Maybe there was a problem earlier (I dunno), but "cvs log mappostgis.c" works for me now. It completes within a few seconds (normal response time). -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From pere at HUNGRY.COM Sun Feb 6 17:35:38 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:43 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: Message-ID: [Stephen Woodbridge] > I am also concerned that the huge amount of work the Petter is doing > needs to get integrated into the source. If there is no one that has > the time to integrate these patches, then I think you should > seriously consider giving Petter full CVS access so he can check > them in his self. While I appreaciate your trust, I must say I do not really want CVS write access. It is comforting to know that at least one more pair of eyes have reviewed the changes I propose before they are admitted into the official release. Not that I would dream of commiting untested changes into CVS, but mistakes always happen anyway. Also, I hope everyone is aware of what I wrote in my introduction email. I'm not getting involved with mapserver for the long run. I'm here to try to get it ready to be included in Debian. That includes improving the code quality and finding as many bugs as possible up front. When it is included, I will move on to PostGIS to get that part of Debian GIS ready for Debian too. But there are no doubt that having CVS write access would speed up the process of getting the code to work on all the archs in Debian, and to fix the bugs detected in the process. I would welcome such access, and still pass the larger patches for review on the mailing list or in Bugzilla. After all, I do not yet understand how most of mapserver work. I can find and fix nobrainer problems (like unused variables and C++ type comments), but haven't full understanding of the logic in the mapserver source. [Sean Gillies] > Before we add _another_ developer who has aims to broadly overhaul > the source, I suggest we have some discussion and even codification > of MapServer's mission, scope, and development policies. I'm not > proposing a full blown bureaucracy, just a simple framework that > makes it easy to bring new developers onboard and keep everybody > rowing in the same general direction whatever that may be. This would be most welcome, independent of my write access to CVS. :) From steve.lime at DNR.STATE.MN.US Mon Feb 7 17:44:51 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: CVS access issues? Message-ID: Fine for me as well... >>> Daniel Morissette 2/6/2005 1:08:29 PM >>> Kralidis,Tom [Burlington] wrote: > > This just sits there and hangs: > > # cvs log mappostgis.c > Maybe there was a problem earlier (I dunno), but "cvs log mappostgis.c" works for me now. It completes within a few seconds (normal response time). -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From Tom.Kralidis at EC.GC.CA Mon Feb 7 21:35:43 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:43 2008 Subject: CVS access issues? Message-ID: Gremlins.... > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Steve Lime > Sent: Monday, 07 February, 2005 17:45 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] CVS access issues? > > > Fine for me as well... > > >>> Daniel Morissette 2/6/2005 1:08:29 PM > >>> > Kralidis,Tom [Burlington] wrote: > > > > This just sits there and hangs: > > > > # cvs log mappostgis.c > > > > Maybe there was a problem earlier (I dunno), but "cvs log > mappostgis.c" works for me now. It completes within a few > seconds (normal response time). > > -- > ------------------------------------------------------------ > Daniel Morissette dmorissette@dmsolutions.ca > DM Solutions Group http://www.dmsolutions.ca/ > ------------------------------------------------------------ > From jsinger at EGGMOUSE.COM Wed Feb 9 17:22:19 2005 From: jsinger at EGGMOUSE.COM (Jan Singer) Date: Fri Feb 8 14:55:43 2008 Subject: Possible infinite loop Message-ID: Dear Devs, today I tried to update a working mapserver from 4.0.1 to 4.4.1 (due to a server change). The mapfile, which was working fine with the old version, causes trouble with the new version resulting in a segmentation fault. I found out that the function msEvalContext() in maputil.c calls the msLayerIsVisible() in mapdraw.c, which itself calls msEvalContext() again under circumstances - which I had with my mapfile. As a quick hack I changed maputil.c, function msEvalContext(), line 175 (version 4.4.1) from visible = msLayerIsVisible(map, (map->layers[i])); to visible = map->layers[i].status != MS_OFF; That's not really a fix, I suggest :-) Maybe someone has a better solution for this issue. Regards, Jan From dmorissette at DMSOLUTIONS.CA Wed Feb 9 18:28:11 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: Possible infinite loop In-Reply-To: <420A8D1B.7070502@eggmouse.com> Message-ID: Jan Singer wrote: > > I found out that the function msEvalContext() in maputil.c calls the > msLayerIsVisible() in mapdraw.c, which itself calls msEvalContext() > again under circumstances - which I had with my mapfile. > I remember that there was a bug about a similar issue that Steve fixed just before the 4.4 release: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1059 I don't know if what you ran into is the same problem or or just another instance of the same thing elsewhere in the code, I guess I'll let Steve comment on that. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From steve.lime at DNR.STATE.MN.US Wed Feb 9 21:45:35 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: Possible infinite loop Message-ID: I need to see the mapfile to really address the problem. It's possible that REQUIRES is not being properly used and I'm not catching that particular case. The function can recurse when trying to detect relationships between layers, so that's ok. So Jan, if you would send me the mapfile that would help. Steve >>> Daniel Morissette 02/09/05 5:28 PM >>> Jan Singer wrote: > > I found out that the function msEvalContext() in maputil.c calls the > msLayerIsVisible() in mapdraw.c, which itself calls msEvalContext() > again under circumstances - which I had with my mapfile. > I remember that there was a bug about a similar issue that Steve fixed just before the 4.4 release: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1059 I don't know if what you ran into is the same problem or or just another instance of the same thing elsewhere in the code, I guess I'll let Steve comment on that. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From stigmata_blackangel at YAHOO.COM Wed Feb 9 23:39:59 2005 From: stigmata_blackangel at YAHOO.COM (Gregor Mosheh) Date: Fri Feb 8 14:55:43 2008 Subject: corrected version of shp2mysql.pl Message-ID: I posted to mapserver-users yesterday that shp2mysql.pl was not working correctly. I have corrected the problem in shp2mysql.pl, and the corrected file is attached. I also sent a copy to Atilla Csipa. I think that, if your testing confirms that my changes were a good thing, it would make a good update to the next MapServer release. The problem I described: Running the program gave a "not an array reference at line 235" error. This was after the tables had been created, while parsing the first shape in the shapefile. This problem existed with different shapefiles of various geometry types. Analysis: Iteration through the shape's attributes was using a numeric index through an arrayref, and the attributes are stored in a hashref keyed by the attribute name. Thus, not an array reference. I could only guess that some old version of Geo::Shapelib used indexes, but Geo::Shapelib 0.12 and 0.13 use a hash. Fix: Around line 240, a simple replacement of the iteration to instead use @{$shape->{FieldNames}} for iteration and ${$shape->{ShapeRecords}}[$_]{$fieldname} for attribute fetching. Result: It now works, seeming properly. The Geo::Shapelib versions available to CPAN, back to 0.09, have a FieldNames attribute and therefore this modified shp2mysql.pl should work with those versions of this library. __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail -------------- next part -------------- #!/usr/bin/perl # Copyright (c) 2003, Attila Csipa, Manufaktura Internet Inzenjering doo # Gregor Mosheh, Feb 2005 - line 235, fixed the iteration to use # attributes' names instead of index number $|=1; use DBI; use Geo::Shapelib qw/:all/; #use Shape qw/:all/; # use this if you have an older shapelib version installed and the above line fails (also change line 29) $dbname = "gisdata"; $host = "localhost"; $dbuser = "gisdata"; $dbpass = "password"; $mac = 0; # this is not a mac $ENDIAN = 1; # 0 = big endian - mac, 1 = little endian - intel # --- do not edit below this line die "Configure database parameters on the beginning of this script file\n" if $dbname eq "changeme"; $dbh = DBI->connect("DBI:mysql:$dbname:$host:3306",$dbuser,$dbpass) || die $DBI::errstr ; $dbh->{RaiseError} = 1; die "Usage: shp2mysql shpname\n\nwhere shpname is the name (with path) to the base name of the shape file (do not include file name extensions !)\n" unless $ARGV[0]; die "Shapefile $ARGV[0] not found !" unless -f "$ARGV[0].shp"; $shape = new Geo::Shapelib $ARGV[0]; #$shape = new Shape $ARGV[0]; $WKB_POINT = 1; $WKB_LINESTRING = 2; $WKB_POLYGON = 3; $WKB_MULTIPOINT = 4; $WKB_MULTILINESTRING = 5; $WKB_MULTIPOLYGON = 6; $WKB_GEOMETRYCOLLECTION = 7; sub query { my $sth = $dbh->prepare(shift) or die "DBI error $!"; $sth->execute or die "DBI error $!"; return $sth; } sub rect { my ($x0, $y0, $x1, $y1) = @_; my $minx = $x0 < $x1 ? $x0 : $x1; my $maxx = $x0 >= $x1 ? $x0 : $x1; my $miny = $y0 < $y1 ? $y0 : $y1; my $maxy = $y0 >= $y1 ? $y0 : $y1; return ($minx, $miny, $maxx, $maxy); } $dbh->do("CREATE TABLE IF NOT EXISTS GEOMETRY_COLUMNS ( F_TABLE_CATALOG varchar(100) NOT NULL default '', F_TABLE_SCHEMA varchar(100) NOT NULL default '', F_TABLE_NAME varchar(100) NOT NULL default '', F_GEOMETRY_COLUMN varchar(100) NOT NULL default '', G_TABLE_CATALOG varchar(100) NOT NULL default '', G_TABLE_SCHEMA varchar(100) NOT NULL default '', G_TABLE_NAME varchar(100) NOT NULL default '', STORAGE_TYPE int(11) NOT NULL default '0', GEOMETRY_TYPE int(11) NOT NULL default '0', COORD_DIMENSION int(11) NOT NULL default '0', MAX_PPR int(11) NOT NULL default '0', SRID int(11) NOT NULL default '0', PRIMARY KEY (F_TABLE_CATALOG,F_TABLE_SCHEMA,F_TABLE_NAME,F_GEOMETRY_COLUMN) ) TYPE=MyISAM;"); $dbh->do("CREATE TABLE IF NOT EXISTS SPATIAL_REF_SYS ( SRID int(11) NOT NULL default '0', AUTH_NAME varchar(255) default NULL, AUTH_SRID int(11) default NULL, SRTEXT varchar(255) default NULL, PRIMARY KEY (SRID) ) TYPE=MyISAM;"); %sqlcreate = ( point => " id int(11) NOT NULL auto_increment, layer int(11) NOT NULL default '0', x1 double default NULL, y1 double default NULL, x2 double default NULL, y2 double default NULL, vertices int(11) NOT NULL default '1', GID int(11) NOT NULL, PRIMARY KEY (id), FOREIGN KEY GID(GID, x1, y1, x2, y2) REFERENCES geometry_point_num (GID), KEY layer (layer), KEY turbo (x2,y2,x1,y1)", arc => " id int(11) NOT NULL auto_increment, layer int(11) NOT NULL default '0', x1 double default NULL, y1 double default NULL, x2 double default NULL, y2 double default NULL, vertices int(11) NOT NULL default '1', GID int(11) NOT NULL, PRIMARY KEY (id), FOREIGN KEY GID(GID, x1, y1, x2, y2) REFERENCES geometry_arc_num (GID), KEY layer (layer), KEY turbo (x2,y2,x1,y1)", polygon => " id int(11) NOT NULL auto_increment, layer int(11) NOT NULL default '0', x1 double default NULL, y1 double default NULL, x2 double default NULL, y2 double default NULL, vertices int(11) NOT NULL default '1', GID int(11) NOT NULL, PRIMARY KEY (id), FOREIGN KEY GID(GID, x1, y1, x2, y2) REFERENCES geometry_polygon_num (GID), KEY layer (layer), KEY turbo (x2,y2,x1,y1)", annotation => " id int(11) NOT NULL auto_increment, layer int(11) NOT NULL default '0', x1 double default NULL, y1 double default NULL, x2 double default NULL, y2 double default NULL, vertices int(11) NOT NULL default '1', angle double default '0.0', size int not null default '10', txt VARCHAR(255) NOT NULL default '', GID int(11) NOT NULL, PRIMARY KEY (id), FOREIGN KEY GID(GID, x1, y1, x2, y2) REFERENCES geometry_annotation_num (GID), KEY layer (layer), KEY turbo (x2,y2,x1,y1)", num => " GID INTEGER NOT NULL, ESEQ INTEGER NOT NULL, ETYPE INTEGER NOT NULL, SEQ INTEGER NOT NULL, X1 double default NULL, Y1 double default NULL, X2 double default NULL, Y2 double default NULL, CONSTRAINT GID_PK PRIMARY KEY (GID, ESEQ, SEQ), KEY x (X1,Y1)", bin => " GID INTEGER NOT NULL, XMIN double default NULL, YMIN double default NULL, XMAX double default NULL, YMAX double default NULL, WKB_GEOMETRY BLOB, KEY (GID), KEY x (XMIN,YMIN,XMAX,YMAX)" ); $sqlcreate{'3'} = $sqlcreate{'arc'}; $sqlcreate{'line'} = $sqlcreate{'arc'}; sub mklayer { my ($sh, $type, $add) = @_; $sh =~ tr/-/_/; #print "$sh/$type ($sqlcreate{$type})\n"; $dbh->do("drop table if exists $sh"); $dbh->do("drop table if exists $sh"); $dbh->do("drop table if exists ${sh}_num"); $dbh->do("drop table if exists ${sh}_bin"); $dbh->do("create table if not exists $sh ($sqlcreate{$type} $add)"); $dbh->do("create table if not exists ${sh}_num ($sqlcreate{num})"); $dbh->do("create table if not exists ${sh}_bin ($sqlcreate{bin})"); $dbh->do("delete from GEOMETRY_COLUMNS where F_TABLE_NAME = ".$dbh->quote($sh)); $dbh->do("insert into GEOMETRY_COLUMNS (F_TABLE_CATALOG,F_TABLE_SCHEMA,F_TABLE_NAME,F_GEOMETRY_COLUMN,G_TABLE_CATALOG,G_TABLE_SCHEMA,G_TABLE_NAME,STORAGE_TYPE,GEOMETRY_TYPE,COORD_DIMENSION,MAX_PPR,SRID) values ('$dbname', '', ".$dbh->quote($sh).", 'GID', '$dbname', '', ".$dbh->quote("${sh}_bin").", 1, '$gtype{$type}', 2, 2, 0)"); } sub wkb { $int = $mac ? "N" : "V"; my ($poly, $end, $wkbt)= (shift, shift, shift); my $wkb = pack("C$int$int", $end, $WKB_GEOMETRYCOLLECTION, 1); $wkb .= pack("C$int", $end, $wkbt); my $nr = shift; if ($poly){ $wkb .= pack("$int", $nr); } while ($nr -- > 0){ my $pts = shift; if ($wkbt != $WKB_POINT){ $wkb .= pack("$int", $pts); } $double = "";; for (my $i=0; $i<$pts; $i++){ $double = pack("dd", shift, shift); if ($mac){ @o = unpack("CCCCCCCCCCCCCCCC", $double); $double = pack("CCCCCCCCCCCCCCCC", $o[7],$o[6],$o[5],$o[4],$o[3],$o[2],$o[1],$o[0],$o[15],$o[14],$o[13],$o[12],$o[11],$o[10],$o[9],$o[8]); } $wkb .= $double; } } return $wkb; } @tmp = split(/\//, $ARGV[0]); $sh = pop @tmp; undef $fields; undef @field; undef $appendvars; undef $vars; #$shape->{FieldTypes} = ['Integer']; for (@{$shape->{FieldNames}}){ $fields .= ", f_$_ VARCHAR(255) NOT NULL DEFAULT ''"; push @field, "f_$_"; $appendvars .= ", f_$_ "; $vars++; } if ($shape->{Shapetype} eq POINT){ mklayer($sh , 'point', $fields); } elsif ($shape->{Shapetype} eq LINE or $shape->{Shapetype} eq 3){ mklayer($sh , 'line', $fields); } elsif ($shape->{Shapetype} eq ARC){ mklayer($sh , 'arc', $fields); } elsif ($shape->{Shapetype} eq POLYGON){ mklayer($sh , 'polygon', $fields); } for (0..@{$shape->{Shapes}}-1){ undef $appenddata; #for ($v = 0; $v < $vars; $v++){ # $appenddata .= ", ".$dbh->quote(${$shape->{ShapeRecords}}[$_][$v]); #} foreach my $fieldname (@{$shape->{FieldNames}}) { $appenddata .= ", ".$dbh->quote(${$shape->{ShapeRecords}}[$_]{$fieldname}); #print $dbh->quote(${$shape->{ShapeRecords}}[$_]{$fieldname}); } $vrt=-1; while (${$shape->{Shapes}}[$_]{Vertices}[++$vrt][0] ne undef){ $gid++; $feat++; undef %object; if ($shape->{Shapetype} eq LINE or $shape->{Shapetype} eq 3){ $object{x0} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt-1][0]; $object{y0} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt-1][1]; $object{x1} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt][0]; $object{y1} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt][1]; next unless $object{x0}; # line print "-"; $dbh->do("insert into ${sh}_num (GID, ESEQ, SEQ, ETYPE, X1, Y1, X2, Y2) values ('$gid', 1, 1, 2, '$object{x0}','$object{y0}','$object{x1}','$object{y1}')"); $string = wkb(0, $ENDIAN, $WKB_LINESTRING, 1, 2,$object{x0}, $object{y0}, $object{x1}, $object{y1}); my $sth = $dbh->prepare("insert into ${sh}_bin (GID, XMIN, YMIN, XMAX, YMAX, WKB_GEOMETRY) values ('$gid', '$object{x0}','$object{y0}','$object{x1}','$object{y1}', ? )"); $sth->execute($string); $sth->finish; ($minx, $miny, $maxx, $maxy) = rect($object{x0}, $object{y0}, $object{x1}, $object{y1}); $dbh->do("insert into $sh (id, layer, vertices, GID, x1, y1, x2, y2 $appendvars) values ('$feat', '$layer{$sh}', 1, '$gid', '$minx', '$miny', '$maxx', '$maxy' $appenddata)") if $vrt eq 0; } elsif ($shape->{Shapetype} eq ARC){ $object{x0} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt-1][0]; $object{y0} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt-1][1]; $object{x1} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt][0]; $object{y1} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt][1]; next unless $object{x0}; # line print "-"; $dbh->do("insert into ${sh}_num (GID, ESEQ, SEQ, ETYPE, X1, Y1, X2, Y2) values ('$gid', 1, 1, 2, '$object{x0}','$object{y0}','$object{x1}','$object{y1}')"); $string = wkb(0, $ENDIAN, $WKB_LINESTRING, 1, 2,$object{x0}, $object{y0}, $object{x1}, $object{y1}); my $sth = $dbh->prepare("insert into ${sh}_bin (GID, XMIN, YMIN, XMAX, YMAX, WKB_GEOMETRY) values ('$gid', '$object{x0}','$object{y0}','$object{x1}','$object{y1}', ? )"); $sth->execute($string); $sth->finish; ($minx, $miny, $maxx, $maxy) = rect($object{x0}, $object{y0}, $object{x1}, $object{y1}); $dbh->do("insert into $sh (id, layer, vertices, GID, x1, y1, x2, y2 $appendvars) values ('$feat', '$layer{$sh}', 1, '$gid', '$minx', '$miny', '$maxx', '$maxy' $appenddata)") if $vrt eq 0; } elsif ($shape->{Shapetype} eq POINT){ $object{x0} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt][0]; $object{y0} = ${$shape->{Shapes}}[$_]{Vertices}[$vrt][1]; # point print "."; $dbh->do("insert into ${sh}_num (GID, ESEQ, SEQ, ETYPE, X1, Y1, X2, Y2) values ('$gid', 1, 1, 1, '$object{x0}','$object{y0}','0','0')"); my $sth = $dbh->prepare("insert into ${sh}_bin (GID, XMIN, YMIN, XMAX, YMAX, WKB_GEOMETRY) values ('$gid', '$object{x0}','$object{y0}','$object{x0}','$object{y0}', ?)"); $sth->execute(wkb(0, $ENDIAN, $WKB_POINT, 1, 1,$object{x0}, $object{y0})); $sth->finish; $dbh->do("insert into $sh (id, layer, vertices, GID, x1, y1, x2, y2 $appendvars) values ('$feat', '$layer{$sh}', 1, '$gid', '$object{x0}', '$object{y0}', '$object{x0}', '$object{y0}' $appenddata)"); } elsif ($shape->{Shapetype} eq POLYGON){ # poly print "O"; @vertex = @{${$shape->{Shapes}}[$_]{Vertices}}; ($minx, $miny, $maxx, $maxy) = rect($vertex[0][0], $vertex[0][1], $vertex[0][0], $vertex[0][1]); $eseq=1; push @vertices, $vertex[0][0], $vertex[0][1]; for ($v = 1; $v<=$#vertex; $v++) { $dbh->do("insert into ${sh}_num (GID, ESEQ, SEQ, ETYPE, X1, Y1, X2, Y2) values ('$gid', 1, $v, 3, '$vertex[$v -1][0]','$vertex[$v -1][1]', '$vertex[$v][0]','$vertex[$v][1]')"); push @vertices, $vertex[$v][0], $vertex[$v][1]; $maxx = $vertex[$v][0] if ($vertex[$v][0] > $maxx); $minx = $vertex[$v][0] if ($vertex[$v][0] < $minx); $maxy = $vertex[$v][1] if ($vertex[$v][1] > $maxy); $miny = $vertex[$v][1] if ($vertex[$v][1] < $miny); # $dbh->do("insert into vertex (shape,x,y,z) values ('$shape_id','$vertex[$v][0]','$vertex[$v][1]','0')"); } my $sth = $dbh->prepare("insert into ${sh}_bin (GID, XMIN, YMIN, XMAX, YMAX, WKB_GEOMETRY) values ('$gid', '$minx','$miny','$maxx','$maxy', ?)"); $sth->execute(wkb(1, $ENDIAN, $WKB_POLYGON, 1, $#vertex+1, @vertices)); $sth->finish; undef @vertices; $dbh->do("insert into $sh (id, layer, vertices, GID, x1, y1, x2, y2 $appendvars) values ('$feat', '$layer{$sh}', '$#vertex', '$gid', '$minx', '$miny', '$maxx', '$maxy' $appenddata)") if $vrt eq 0; $vrt = $#vertex; } } } print "\n"; From plists at PROMETHEUS.ORG.YU Thu Feb 10 17:06:08 2005 From: plists at PROMETHEUS.ORG.YU (Attila Csipa) Date: Fri Feb 8 14:55:43 2008 Subject: corrected version of shp2mysql.pl In-Reply-To: <20050210043959.2382.qmail@web53807.mail.yahoo.com> Message-ID: On Thursday 10 February 2005 05:39, Gregor Mosheh wrote: > I posted to mapserver-users yesterday that > shp2mysql.pl was not working correctly. I have > corrected the problem in shp2mysql.pl, and the > corrected file is attached. I also sent a copy to I'll run a few test examples and commit to CVS if it has not been done already. Thanks ! From plists at PROMETHEUS.ORG.YU Thu Feb 10 17:22:21 2005 From: plists at PROMETHEUS.ORG.YU (Attila Csipa) Date: Fri Feb 8 14:55:43 2008 Subject: wiki ? Message-ID: Is there any news concerning the write access to the wiki ? From steve.lime at DNR.STATE.MN.US Fri Feb 11 13:54:55 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: wiki ? Message-ID: Nope. The desire is to get the new website up to fill this role. Steve >>> Attila Csipa 2/10/2005 4:22:21 PM >>> Is there any news concerning the write access to the wiki ? From pere at HUNGRY.COM Sat Feb 12 06:09:29 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:43 2008 Subject: [PATCH] Fix --disable-runpath configure option In-Reply-To: (Petter Reinholdtsen's message of "Sat, 05 Feb 2005 22:25:12 +0100") Message-ID: [Petter Reinholdtsen] > While reading through configure.in in CVS, I came across what what > seem to me like a cut-n-paste typo. The --disable-runpath configure > option do not work, and --enable-debug is implemented twice. I > believe this patch implement the intended behaviour. Anyone know if > this the correct fix or not? Ok, no-one protested, so I assume the patch is correct. Now reported to bugzilla, . From pere at HUNGRY.COM Sat Feb 12 12:52:06 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:43 2008 Subject: Is the MapServer code supposed to be ANSI C? In-Reply-To: <20050201222658.GA3980@saruman.uio.no> (Petter Reinholdtsen's message of "Tue, 1 Feb 2005 23:26:58 +0100") Message-ID: [Petter Reinholdtsen] > Here is a start, getting rid of '//' comments in the header files, > and also adding info about which #ifdef an #endif matches. I completed this work, making a patch converting all the source to use C89-style comments. It is available from . With this patch, only 45 warnings are reported when compiling using -pedantic: This is not too bad, I believe. the C99 hex constants is a bug in the glibc header files. The others should be fixable in the mapserver source. maputil.c:1027: warning: `return' with a value, in function returning void mapproject.c:93:32: warning: use of C99 hexadecimal floating constant mapproject.c:93:56: warning: use of C99 hexadecimal floating constant mappostgis.c:275: warning: string length `811' is greater than the length `509' ISO C89 compilers are required to support mapresample.c:562:21: warning: use of C99 hexadecimal floating constant mapresample.c:562:41: warning: use of C99 hexadecimal floating constant mapresample.c:850:25: warning: use of C99 hexadecimal floating constant mapresample.c:850:45: warning: use of C99 hexadecimal floating constant mapresample.c:866:25: warning: use of C99 hexadecimal floating constant mapresample.c:866:45: warning: use of C99 hexadecimal floating constant mapresample.c:884:21: warning: use of C99 hexadecimal floating constant mapresample.c:884:41: warning: use of C99 hexadecimal floating constant mapwms.c:2883: warning: string length `974' is greater than the length `509' ISO C89 compilers are required to support mapwms.c:2866: warning: string length `973' is greater than the length `509' ISO C89 compilers are required to support mapgd.c:2757: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2758: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2759: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2760: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2761: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2762: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2763: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2764: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2768: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2770: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2780: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2781: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2782: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2783: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2784: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2785: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2786: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2787: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2791: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapgd.c:2793: warning: pointer targets in passing arg 5 of `gdImageString' differ in signedness mapswf.c:0: warning: ISO C forbids an empty source file mapwfslayer.c:355: warning: ISO C90 does not support the `%lf' printf format mapwfslayer.c:355: warning: ISO C90 does not support the `%lf' printf format mapwfslayer.c:355: warning: ISO C90 does not support the `%lf' printf format mapwfslayer.c:355: warning: ISO C90 does not support the `%lf' printf format mappdf.c:0: warning: ISO C forbids an empty source file mapgraticule.c:70: warning: comma at end of enumerator list maptime.c:157: warning: implicit declaration of function `strptime' maptime.c:157: warning: return makes pointer from integer without a cast mapsvg.c:0: warning: ISO C forbids an empty source file epplib.c:228: warning: pointer targets in passing arg 1 of `swap2' differ in signedness From pere at HUNGRY.COM Sun Feb 13 18:13:49 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:43 2008 Subject: Automatic coverage testing of mapserv? In-Reply-To: <42065925.3050702@dmsolutions.ca> (Daniel Morissette's message of "Sun, 6 Feb 2005 12:51:33 -0500") Message-ID: [Daniel Morissette] > Agreed, and we might even be able to offer an older machine for > this, perhaps later this spring because things are just too crazy > for us at the moment. That would be nice. I've set up a system to compile the soruce and run the tests in msautotest/, and report the valgrind errors and coverage information on the web. The coverage information is available from , if you want to see the current result. From joluinfante at GMAIL.COM Mon Feb 14 11:59:32 2005 From: joluinfante at GMAIL.COM (Jorge Infante) Date: Fri Feb 8 14:55:43 2008 Subject: About the db connections to mapserv Message-ID: Hello to all. I'm new in this listserv. I'm working to try to connect the product mapserv with "IBM informix spatial datablade". I prepared a .map replacing "airports" layer (of the demo) for a description of the airports table in my spatial enabled informix db. Then, I wrote a basic "mapinformixspatial.c", and, last weekend, I actually saw "airports point" on my screen (from my spatial db). I worked a for week to obtain this, and, I suppouse that in a month, I will be able to complete a beta version. At my job, this feature is necessary, since I don't have the money to buy SDE product. I'd like to contribute to your project with this feature. The question is "what are the steps I must take"? TIA jorge infante From bartvde at XS4ALL.NL Mon Feb 14 12:26:59 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: Hi list, I for one (but then again I am curious by nature :) ) would be very much interested whether or not the main developers of Mapserver maintain their own wishlist for future Mapserver features, and if they would be willing to share them with the community. Sometimes a lot of things are on a wishlist, which don't get funded. But ofcourse things need to be known to people in order to have a higher chance of getting funded. And a lot of things wouldn't even come to the mind of a user, but which could be essential for the development of the software. Also, if there are a lot of large/heavy points on the wishlists, it may require funding from several parties which team up together. Ofcourse Steve already showed a part of his wishlist at the MUM2 conference, on which GEOS integration featured, as well as better J2EE/.NET support for Mapserver (if I recall correctly). On other occassions I have seen e-mails about enhancing the cartographic features of Mapserver. What else is on the lists? Best regards, Bart -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ From fwarmerdam at GMAIL.COM Mon Feb 14 13:15:41 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: Message-ID: On Mon, 14 Feb 2005 18:26:59 +0100, Bart van den Eijnden wrote: > What else is on the lists? Bart, Nothing too exciting on my lists, but it includes: o Support for colorbars so that continuous values (whether from a raster or vector attributes) can be assign a color from a range without defining a whole set of classes. likewise, I would like to be able to show the colorbar where we would normally show the class legend. o Reworking features access for query results so that features are not normally fetched by id, which can be quite expensive. o Rework filtering so that there is a generic filtering format (perhaps just the current mapserver expressions) that can be converted into each data providers filtering format instead of the current approach of custom per-provider FILTER formats. o Ensure that WFS passes it's filter spec down to native providers to implement efficiently. o The ability to hold raster datasources open so that a fastcgi mapserver could take advantage of GDAL's in memory caching. o Convert mapogr.cpp to C, so that MapServer isn't so tightly bound to a particular build of GDAL. The current C++ interface is fragile. o Better multi-threading support including making some portions re-entrant and finer grained locks in others areas (ie. GDAL/OGR). Of course, I also wish for stuff like better docs, better testsuites, etc. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From sgillies at FRII.COM Mon Feb 14 13:40:05 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: Message-ID: On Feb 14, 2005, at 10:26 AM, Bart van den Eijnden wrote: > ... > What else is on the lists? > I've got two reasonable items on my list: * style level (not layer level) feature opacity. * faster rendering of features from memory using mapscript to reduce the performance gap between rendering a layer connected to data via a mapserver connector and rendering features obtained through a scripting interface to OGR or Postgres. and one pie-in-the-sky item: * explore using Cairo instead of GD. Cairo has the cartoline stuff built in, and can take advantage of graphic accelerators. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From dmorissette at DMSOLUTIONS.CA Mon Feb 14 14:04:07 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: Message-ID: Sean Gillies wrote: > > * explore using Cairo instead of GD. Cairo has the cartoline stuff > built in, and can take advantage of graphic accelerators. > "take advantage of graphics accelerators"? Do you mean the hardware graphics accelerators built into your VGA display adapter? Is there a way that a server could share the same graphics accelerator with 10 concurrent requests? -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From hobu at IASTATE.EDU Mon Feb 14 14:29:56 2005 From: hobu at IASTATE.EDU (Howard Butler) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: <4210F627.2000808@dmsolutions.ca> Message-ID: Here's my wishlist: Pie-in-the-sky ------------------------------------ - Explore the (optional) use of the Apache Portable Runtime inside of MapServer. For many of the string, thread, and hash functions/objects in maputil.c, we could replace them with the APR versions. This effort could get us closer to a mod_mapserver and allow us to easily grab other functionality when we need it. Those that I hope to make happen before 4.6/4.8 ------------------------------------- - Joins for SDE. It would also be nice to have joins be uniform across all of the datasources that implement them, rather than having each datasource define its own syntax and implmentation. - Finish up the SDE Raster support so that it is no longer declared "experimental". This might mean helping Frank et. al. implement SDE rasters as a datatype in GDAL and going in about it that way. - More automation and test reporting of my nightly windows build suite. Move my build suite to Python 2.4 and MSVC 7.1. From sgillies at FRII.COM Mon Feb 14 16:07:41 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: Message-ID: On Feb 14, 2005, at 12:04 PM, Daniel Morissette wrote: > Sean Gillies wrote: >> >> * explore using Cairo instead of GD. Cairo has the cartoline stuff >> built in, and can take advantage of graphic accelerators. >> > > "take advantage of graphics accelerators"? Do you mean the hardware > graphics accelerators built into your VGA display adapter? Is there a > way that a server could share the same graphics accelerator with 10 > concurrent requests? > I doubt it. But some people are using mapscript for desktop apps and it could be helpful to them. Myself, I'm intrigued by the richer graphic stroking and filling of Cairo. Sean From ed at TOPOZONE.COM Mon Feb 14 16:24:27 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: Sean & Daniel - CPUs only do one thing at a time, too! Yes, if an accelerated graphics card is installed in a server, and an application like MapServer is using a library that uses that accelerator, then that accelerator can be shared by all client requests. Like any hardware resource, some operations will be serialized, but the resource can be shared. However, good old general-purpose CPUs do 2D graphics just fine, and I don't expect MapServer to be able to gain much from any hardware graphics acceleration. There's a certain setup/communications overhead to any hardware graphics acceleration, and that's usually more than made up for by the complexity of the rendering operation. If you're asking a graphics accelerator to help you draw a fancy-looking 30-pixel-long styled railroad symbol, it's unlikely to be much help. - Ed Ed McNierney TopoZone.com -----Original Message----- From: UMN MapServer Developers List [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Sean Gillies Sent: Monday, February 14, 2005 4:08 PM To: MAPSERVER-DEV@LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-DEV] wishlists On Feb 14, 2005, at 12:04 PM, Daniel Morissette wrote: > Sean Gillies wrote: >> >> * explore using Cairo instead of GD. Cairo has the cartoline stuff >> built in, and can take advantage of graphic accelerators. >> > > "take advantage of graphics accelerators"? Do you mean the hardware > graphics accelerators built into your VGA display adapter? Is there a > way that a server could share the same graphics accelerator with 10 > concurrent requests? > I doubt it. But some people are using mapscript for desktop apps and it could be helpful to them. Myself, I'm intrigued by the richer graphic stroking and filling of Cairo. Sean From plists at PROMETHEUS.ORG.YU Mon Feb 14 18:10:25 2005 From: plists at PROMETHEUS.ORG.YU (Attila Csipa) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: <4BF377919225F449BB097CB76FFE9BC80FCC18@ptolemy.topozone.com> Message-ID: On Monday 14 February 2005 22:24, Ed McNierney wrote: > However, good old general-purpose CPUs do 2D graphics just fine, and I > don't expect MapServer to be able to gain much from any hardware > graphics acceleration. There's a certain setup/communications overhead > to any hardware graphics acceleration, and that's usually more than made > up for by the complexity of the rendering operation. If you're asking a In theory, there are parts you could use. These could be for example rotating, scaling and blending raster or already rendered vector layers, use of hardware anti-aliasing, etc. I'm not that much into low level accelerator programming so I wouldn't how how much you would gain (if anything) by these operations, or how much memory bandwidth could be saved by, say, caching raster layers in accelerator memory, etc. Perhaps someone proficient with OpenGL could give a rough analysis ? From nhv at CAPE.COM Mon Feb 14 18:35:33 2005 From: nhv at CAPE.COM (Norman Vine) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: <76F1AED2-7ECC-11D9-ACEB-000D9329D732@frii.com> Message-ID: Sean Gillies writes: > > > Sean Gillies wrote: > >> > >> * explore using Cairo instead of GD. Cairo has the cartoline stuff > >> built in, and can take advantage of graphic accelerators. > >> > > > > "take advantage of graphics accelerators"? Do you mean the hardware > > graphics accelerators built into your VGA display adapter? Is there a > > way that a server could share the same graphics accelerator with 10 > > concurrent requests? > > > > I doubt it. But some people are using mapscript for desktop apps and > it could be helpful to them. Myself, I'm intrigued by the richer > graphic stroking and filling of Cairo. I don't see much differance between using an offscreen Hardware Drawing Surface and the GD memory device. The limitation here is only one thread can do the drawing and all the Surfaces need to have the same Pixel Format. There are issues with having multiple CPUs where you actually can be doing more then one thing at a time but since it is likely that most time is spent getting to the data it might be advantageous to borrow from the Gameing and VisSim communities where the CPU horsepower is applied to getting the data into a form that the Hardware GFX likes as the Hardware should be able to draw just about anything ***much*** faster then any software implemnetation and waiting for the Drawing Thread to get free shouldn't be too much of a burden :-) Cheers Norman From nhv at CAPE.COM Mon Feb 14 18:41:10 2005 From: nhv at CAPE.COM (Norman Vine) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: <4BF377919225F449BB097CB76FFE9BC80FCC18@ptolemy.topozone.com> Message-ID: Ed McNierney writes: > > > If you're asking a > graphics accelerator to help you draw a fancy-looking 30-pixel-long > styled railroad symbol, it's unlikely to be much help. If you have to start from scratch everytime this is true. However on a dedicated server there is no reason to not have preloaded the instructions for drawing your commonly used GFX objects :-) Also modern GFX cards blow the doors off of the CPUs when it comes to pusing 'bits and bytes' arround even when in 2D mode. Cheers Norman From ed at TOPOZONE.COM Mon Feb 14 21:18:28 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: Norman - Having (formerly) been in the business of building accelerated graphics hardware for a while, I'll respectfully disagree unless you've got some test data. You're presuming that, for small patterned vectors, a graphics processor can "blow the doors off" a general-purpose processor, and that's really not likely to be the case. These operations are quite simple, and the limiting factor tends to be memory bandwidth, rather than the drawing capabilities of the processor. Preloading the pattern is trivial - it's manipulating the RAM that's the bulk of the work. 3D graphics rendering requires quite a bit of math, and the construction and acceleration of rendering pipelines is a BIG improvement. But 2D line drawing, pattern filling and the like primarily consists of loading patterns and stamping them out into RAM, and most CPUs manage RAM read/modify/write cycles just fine. In fact, many of the recent major improvements in graphics hardware have focused more on improving the card's access to memory than on anything else. - Ed -----Original Message----- From: UMN MapServer Developers List [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Norman Vine Sent: Monday, February 14, 2005 6:41 PM To: MAPSERVER-DEV@LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-DEV] wishlists Ed McNierney writes: > > > If you're asking a > graphics accelerator to help you draw a fancy-looking 30-pixel-long > styled railroad symbol, it's unlikely to be much help. If you have to start from scratch everytime this is true. However on a dedicated server there is no reason to not have preloaded the instructions for drawing your commonly used GFX objects :-) Also modern GFX cards blow the doors off of the CPUs when it comes to pusing 'bits and bytes' arround even when in 2D mode. Cheers Norman From ed at TOPOZONE.COM Mon Feb 14 21:21:07 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: Attila - I think that's a helpful way to think about hardware acceleration. It's more likely to make new and improved rendering techniques possible and practical than it is to improve the speed of producing what's currently supported by MapServer. But if you're making 3D map images with realistic illumination, then that's something that could DEFINITELY benefit from hardware acceleration. - Ed -----Original Message----- From: UMN MapServer Developers List [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Attila Csipa Sent: Monday, February 14, 2005 6:10 PM To: MAPSERVER-DEV@LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-DEV] wishlists On Monday 14 February 2005 22:24, Ed McNierney wrote: > However, good old general-purpose CPUs do 2D graphics just fine, and I > don't expect MapServer to be able to gain much from any hardware > graphics acceleration. There's a certain setup/communications overhead > to any hardware graphics acceleration, and that's usually more than made > up for by the complexity of the rendering operation. If you're asking a In theory, there are parts you could use. These could be for example rotating, scaling and blending raster or already rendered vector layers, use of hardware anti-aliasing, etc. I'm not that much into low level accelerator programming so I wouldn't how how much you would gain (if anything) by these operations, or how much memory bandwidth could be saved by, say, caching raster layers in accelerator memory, etc. Perhaps someone proficient with OpenGL could give a rough analysis ? From nhv at CAPE.COM Tue Feb 15 02:22:06 2005 From: nhv at CAPE.COM (Norman Vine) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: <4BF377919225F449BB097CB76FFE9BC80FCC20@ptolemy.topozone.com> Message-ID: Ed McNierney writes: > > Having (formerly) been in the business of building accelerated graphics > hardware for a while, I'll respectfully disagree unless you've got some > test data. You're presuming that, for small patterned vectors, a > graphics processor can "blow the doors off" a general-purpose processor, > and that's really not likely to be the case. These operations are quite > simple, and the limiting factor tends to be memory bandwidth, rather > than the drawing capabilities of the processor. Preloading the pattern > is trivial - it's manipulating the RAM that's the bulk of the work. > > 3D graphics rendering requires quite a bit of math, and the construction > and acceleration of rendering pipelines is a BIG improvement. But 2D > line drawing, pattern filling and the like primarily consists of loading > patterns and stamping them out into RAM, and most CPUs manage RAM > read/modify/write cycles just fine. > > In fact, many of the recent major improvements in graphics hardware have > focused more on improving the card's access to memory than on anything > else. """Quartz Extreme uses a supported graphics card built into your Mac to relieve the main PowerPC chip of on screen calculations. This dramatically improves system performance, making Panther much more responsive.""" http://www.apple.com/macosx/features/quartzextreme/ Also expect the 'bus' to get quite a bit better in the near future :-) http://www.interfacebus.com/Design_Connector_PCI_Express.html Cheers Norman From ed at TOPOZONE.COM Tue Feb 15 08:06:23 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: Norman - I notice Apple didn't mention 2D drawing among the list of improved features ! - Ed -----Original Message----- From: UMN MapServer Developers List [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Norman Vine Sent: Tuesday, February 15, 2005 2:22 AM To: MAPSERVER-DEV@LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-DEV] wishlists Ed McNierney writes: > > Having (formerly) been in the business of building accelerated graphics > hardware for a while, I'll respectfully disagree unless you've got some > test data. You're presuming that, for small patterned vectors, a > graphics processor can "blow the doors off" a general-purpose processor, > and that's really not likely to be the case. These operations are quite > simple, and the limiting factor tends to be memory bandwidth, rather > than the drawing capabilities of the processor. Preloading the pattern > is trivial - it's manipulating the RAM that's the bulk of the work. > > 3D graphics rendering requires quite a bit of math, and the construction > and acceleration of rendering pipelines is a BIG improvement. But 2D > line drawing, pattern filling and the like primarily consists of loading > patterns and stamping them out into RAM, and most CPUs manage RAM > read/modify/write cycles just fine. > > In fact, many of the recent major improvements in graphics hardware have > focused more on improving the card's access to memory than on anything > else. """Quartz Extreme uses a supported graphics card built into your Mac to relieve the main PowerPC chip of on screen calculations. This dramatically improves system performance, making Panther much more responsive.""" http://www.apple.com/macosx/features/quartzextreme/ Also expect the 'bus' to get quite a bit better in the near future :-) http://www.interfacebus.com/Design_Connector_PCI_Express.html Cheers Norman From bartvde at XS4ALL.NL Tue Feb 15 08:51:10 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri Feb 8 14:55:43 2008 Subject: internal server error, lexer problem? Message-ID: Hi list, Fernando Simon and I have been trying for the last days to debug an internal server error from Mapserver, without success. Fernando tests on Linux, with the same Oracle data as I have here, but I work on Windows. Before any of the Oracle debug statements make it into the Apache error log, Mapserver crashes with premature end of script headers. Every function in maporaclespatial.c has a msDebug call, and debugging is working in my environment when I do use a valid, working DATA statement. If I use the following DATA statement: 1. DATA "geom from (SELECT locatie AS geom, naam as NAAM, id AS ID FROM mrg_gemeenten) using unique id srid 90112 filter version 10g" Mapserver crashes on Windows. On Linux it works fine. 2. DATA "geom from (SELECT locatie AS geom, id AS ID FROM mrg_gemeenten) using unique id srid 90112 filter version 10g" Works fine in both environments. Could there be a problem with the lexer in this case? On Linux both data statements work fine. Any thoughts what we could try? Thanks in advance. Best regards, Bart From fsimon at UNIVALI.BR Tue Feb 15 06:52:53 2005 From: fsimon at UNIVALI.BR (Fernando S.) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: Message-ID: Hi folks, For Oracle Spatial support: - The first thing is improve the performance for query's. - The second I believe that is the support for retrieve the 3D data from Oracle Spatial. I believe that is it. More hints? ------------------------------------------------------------------------ Fernando Simon G10 - Laboratorio de Computacao Aplicada - Brazil http://g10.cttmar.univali.br - UNIVALI/CTTMAR ------------------------------------------------------------------------ Bart van den Eijnden wrote: > Hi list, > > I for one (but then again I am curious by nature :) ) would be very much > interested whether or not the main developers of Mapserver maintain their > own wishlist for future Mapserver features, and if they would be willing > to share them with the community. > > Sometimes a lot of things are on a wishlist, which don't get funded. But > ofcourse things need to be known to people in order to have a higher > chance of getting funded. And a lot of things wouldn't even come to the > mind of a user, but which could be essential for the development of the > software. > > Also, if there are a lot of large/heavy points on the wishlists, it may > require funding from several parties which team up together. > > Ofcourse Steve already showed a part of his wishlist at the MUM2 > conference, on which GEOS integration featured, as well as better > J2EE/.NET support for Mapserver (if I recall correctly). > > On other occassions I have seen e-mails about enhancing the cartographic > features of Mapserver. > > What else is on the lists? > > Best regards, > Bart > > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ > From bartvde at XS4ALL.NL Tue Feb 15 08:56:27 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri Feb 8 14:55:43 2008 Subject: internal server error, lexer problem? In-Reply-To: <15575.212.238.227.182.1108475470.squirrel@212.238.227.182> Message-ID: Sorry, forgot to mention a few things. WMS GetMap works fine in both situations (both DATA statements). WMS GetFeatureInfo crashes with statement 1, statement 2 works fine. But the problem seems to be that Mapserver crashes before any of the Oracle functions are called, seeing nothing is in the debug log, and we can't seem to pinpoint where this could happen. Any pointers to that would be very much appreciated. [Tue Feb 15 14:54:33 2005] [error] [client 192.168.3.4] Premature end of script headers: mapserv.exe Best regards, Bart > Hi list, > > Fernando Simon and I have been trying for the last days to debug an > internal server error from Mapserver, without success. > > Fernando tests on Linux, with the same Oracle data as I have here, but I > work on Windows. > > Before any of the Oracle debug statements make it into the Apache error > log, Mapserver crashes with premature end of script headers. Every > function in maporaclespatial.c has a msDebug call, and debugging is > working in my environment when I do use a valid, working DATA statement. > > If I use the following DATA statement: > 1. DATA "geom from (SELECT locatie AS geom, naam as NAAM, id AS ID FROM > mrg_gemeenten) using unique id srid 90112 filter version 10g" > > Mapserver crashes on Windows. On Linux it works fine. > > 2. DATA "geom from (SELECT locatie AS geom, id AS ID FROM mrg_gemeenten) > using unique id srid 90112 filter version 10g" > > Works fine in both environments. > > Could there be a problem with the lexer in this case? On Linux both data > statements work fine. > > Any thoughts what we could try? > > Thanks in advance. > > Best regards, > Bart > From jlacroix at DMSOLUTIONS.CA Mon Feb 14 16:13:35 2005 From: jlacroix at DMSOLUTIONS.CA (Julien-Samuel Lacroix) Date: Fri Feb 8 14:55:43 2008 Subject: MapServer performance issue Message-ID: Hi guys, For bug 1224, I made some profiling. The results are interesting. Add yourself in CC if you are interested or if you have any idea (or better idea of what have been suggested) to fix them. http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1224 My result (from bug 1224): I made a lot of profiling in mapserver for this bug. My tests were based on 50 consecutive call to mapserv CGI 4.0 and 4.5. I used the gmap mapfile. My profiler as gprof. This gave me the following result: 4.0: 6.18 sec for 50 requests. 4.4: 7.56 sec for 50 requests. This gives a diference of 1.38 sec. In that, I found that the main differences were in a GD function (gdImageStringFT in msDrawTextGD) (1.66 sec with 4.0 vs 2.51 sec with 4.4), and in all access to points object (around 0.45 sec lost overall). The lost in msDrawTextGD is due to 7 calls to gdImageStringFT instead of 3 calls in 4.0. This problem will be discussed in bug 1243. http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1243 The lost of performance due to point objects manipulation is due to the addition of the z parameter in the point object. A solution for this will be discussed in bug 1244. http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1244 I made a test by resolving both issue like proposed in the two bugs and it end with this result: 4.4: 6.20 sec for 50 requests 4.0: 6.52 sec for 50 requests Thanks Julien -- ------------------------------------------------------------ Julien-Samuel Lacroix jlacroix@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From strk at REFRACTIONS.NET Wed Feb 16 12:40:37 2005 From: strk at REFRACTIONS.NET (Sandro Santilli) Date: Fri Feb 8 14:55:43 2008 Subject: postgis connector Message-ID: Hello, we're hunting a "supposed" bug in postgis-1.0 or mappostgis.c showing NO geometries from postgis layers. Is anyone here experiencing the bug with current postgis releases ? TIA --strk; From steve.lime at DNR.STATE.MN.US Wed Feb 16 13:01:33 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: MapServer performance issue Message-ID: I think we can go even faster with better improvements in bug 1243. Hopefully I'll have some tiime late this week to test... >>> Julien-Samuel Lacroix 2/14/2005 3:13:35 PM >>> Hi guys, For bug 1224, I made some profiling. The results are interesting. Add yourself in CC if you are interested or if you have any idea (or better idea of what have been suggested) to fix them. http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1224 My result (from bug 1224): I made a lot of profiling in mapserver for this bug. My tests were based on 50 consecutive call to mapserv CGI 4.0 and 4.5. I used the gmap mapfile. My profiler as gprof. This gave me the following result: 4.0: 6.18 sec for 50 requests. 4.4: 7.56 sec for 50 requests. This gives a diference of 1.38 sec. In that, I found that the main differences were in a GD function (gdImageStringFT in msDrawTextGD) (1.66 sec with 4.0 vs 2.51 sec with 4.4), and in all access to points object (around 0.45 sec lost overall). The lost in msDrawTextGD is due to 7 calls to gdImageStringFT instead of 3 calls in 4.0. This problem will be discussed in bug 1243. http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1243 The lost of performance due to point objects manipulation is due to the addition of the z parameter in the point object. A solution for this will be discussed in bug 1244. http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1244 I made a test by resolving both issue like proposed in the two bugs and it end with this result: 4.4: 6.20 sec for 50 requests 4.0: 6.52 sec for 50 requests Thanks Julien -- ------------------------------------------------------------ Julien-Samuel Lacroix jlacroix@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From steve.lime at DNR.STATE.MN.US Wed Feb 16 13:04:21 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: To me it's the quality of output something like Cairo brings to the table. Their samples are very nice. My worry is that it would be so much slower than GD that it would be unusable in a practical sense. Steve >>> Sean Gillies 2/14/2005 12:40:05 PM >>> On Feb 14, 2005, at 10:26 AM, Bart van den Eijnden wrote: > ... > What else is on the lists? > I've got two reasonable items on my list: * style level (not layer level) feature opacity. * faster rendering of features from memory using mapscript to reduce the performance gap between rendering a layer connected to data via a mapserver connector and rendering features obtained through a scripting interface to OGR or Postgres. and one pie-in-the-sky item: * explore using Cairo instead of GD. Cairo has the cartoline stuff built in, and can take advantage of graphic accelerators. cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From sgillies at FRII.COM Wed Feb 16 13:54:07 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: Message-ID: Steve, Would it *necessarily* be slower than all the cartoline games (no offense here, I don't mean this to be perjorative) and multiple text renderings that we must do with GD to get high quality output? Hard to say, I'm finding performance comparisons to be elusive, but that it is taken seriously by GTK+ and Mono http://developers.slashdot.org/article.pl?sid=05/02/04/2021236&from=rss seems to be a positive. Like I said originally, this is a pie-in-the-sky idea and one I will first explore outside of MapServer if I can find the time. cheers, Sean On Feb 16, 2005, at 11:04 AM, Steve Lime wrote: > To me it's the quality of output something like Cairo brings to the > table. Their samples are very nice. My worry is that it would be so > much > slower than GD that it would be unusable in a practical sense. > > Steve > > >>>> Sean Gillies 2/14/2005 12:40:05 PM >>> > On Feb 14, 2005, at 10:26 AM, Bart van den Eijnden wrote: > >> ... >> What else is on the lists? >> > > I've got two reasonable items on my list: > > * style level (not layer level) feature opacity. > > * faster rendering of features from memory using mapscript to reduce > the performance gap between rendering a layer connected to data via a > mapserver connector and rendering features obtained through a > scripting > interface to OGR or Postgres. > > and one pie-in-the-sky item: > > * explore using Cairo instead of GD. Cairo has the cartoline stuff > built in, and can take advantage of graphic accelerators. > > > cheers, > Sean > > -- > Sean Gillies > sgillies at frii dot com > http://users.frii.com/sgillies > From dmorissette at DMSOLUTIONS.CA Wed Feb 16 17:45:08 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: internal server error, lexer problem? In-Reply-To: <15575.212.238.227.182.1108475470.squirrel@212.238.227.182> Message-ID: Bart van den Eijnden wrote: > > Mapserver crashes on Windows. On Linux it works fine. > Maybe you could try running this with Valgrind on Linux and see if anything comes up (double-frees, non-allocated memory, buffer overflow, etc.). -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From steve.lime at DNR.STATE.MN.US Wed Feb 16 18:07:15 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: About the db connections to mapserv Message-ID: Hi Jorge: Glad you're having some success, I think that would be a great addition to MapServer. I must stress that you'd need to commit to maintaining the code into the future. It's unlikely that another developer would be able to (or willing?) step in and take this over. I realize you can't commit to forever, but I don't want to add this feature and then see you go away soon after. That said, to be included we'd need to make sure the functionality is inline as much as possible with the other DB modules and is as free of defects as possible. We'd also need additions to the configure script. Test cases highly recommended (comments Sean?). Next steps? Well, let's start with getting this into bugzilla as an enhancement request to the core MapServer library. You can submit code (the new source file) and patches (configure, map.h, ...) through bugzilla and folks interested in reviewing code can add themselves to be cc'd. Please post the bug number to this list once you get it set up. We can get the code added to the repository once a few folks have a look. Longer term we could consider CVS write access. Steve Stephen Lime Data & Applications Manager Minnesota DNR 500 Lafayette Road St. Paul, MN 55155 651-297-2937 >>> Jorge Infante 2/14/2005 10:59:32 AM >>> Hello to all. I'm new in this listserv. I'm working to try to connect the product mapserv with "IBM informix spatial datablade". I prepared a .map replacing "airports" layer (of the demo) for a description of the airports table in my spatial enabled informix db. Then, I wrote a basic "mapinformixspatial.c", and, last weekend, I actually saw "airports point" on my screen (from my spatial db). I worked a for week to obtain this, and, I suppouse that in a month, I will be able to complete a beta version. At my job, this feature is necessary, since I don't have the money to buy SDE product. I'd like to contribute to your project with this feature. The question is "what are the steps I must take"? TIA jorge infante From dmorissette at DMSOLUTIONS.CA Wed Feb 16 17:30:02 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: Message-ID: Bart van den Eijnden wrote: > > What else is on the lists? > Personally I find that we've got a quite complete set of features, so my personal wishes would go towards improving what's there instead of adding new features: - Performance tuning - Security audits - Easy installation. We've started work on that with MS4W and FGS, but there is still lots of work to do. - Any tools that can make it easier for new users to get up to speed with the software quickly. And finally, one new feature idea: - Ability to work in pre-canned-maps-mode: I'm sure you've all seen Google and its (obviously) pre-canned map tiles. Well, back in 1999, before we found MapServer, that's the direction in which we were going with webmapping at DMSG and Google reminded me of this idea a few weeks ago. This idea was inspired from what a few other sites were doing at the time so it's not new and I can't take credit for inventing it. But then we found MapServer and it's performance and robustness was just so impressive (compared to the alternatives of those days) that we dropped this idea of pre-generating the maps since that was not necessary any more for the types of sites that we were working on. I think that one of MapServer's next challenges is to be able to serve the needs of the high traffic sites that produce tens or hundreds of millions of maps per month, always based on the same *static* street data. If you generate the maps on the fly with a relatively complex mapfile based on vector data with street labelling, etc, then you can only get a few million maps per month per CPU. Imagine the server farm you'd need for 100 million maps. OTOH, since the street data is static, you could pregenerate the maps as tiled rasters for a number of preset scales, configure one raster layer per scale, add a little bit of logic in MapServer to force it to use a discrete number of scales and you're running. You can still plot points on top of the map, do queries, or do anything else that MapServer was doing before... you just don't render the static street data all the time. That would require lots of disk space in some cases, but disk space is cheap as I keep being reminded... and for the cases where it's not practical to pregenerate all the maps, I've also got some ideas for a hybrid mode where the vector layers kick in if no raster tile was found for the current map area. Combine that with a fastcgi (or persistent mapscript) that preloads the mapfile and the raster tileindex in memory and you'd be flying! Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From bartvde at XS4ALL.NL Thu Feb 17 02:52:17 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: <4213C96A.3050404@dmsolutions.ca> Message-ID: Daniel, regarding your idea of pre-generating raster tiles out of vector street data and serving them, it would be very nice to have Label-EZ integrated into Mapserver, since performance is not the biggest issue anymore when you are pre-generating anyway. Whatever happened to the integration of Mapserver and Label-EZ? Thanks everybody for their input. I have got a far better view now where the software *could* be heading to. I think parts of this discussion might also be useful for the mapserver-users list, so I'll make a summary and will post it to the user list. Best regards, Bart > Bart van den Eijnden wrote: >> >> What else is on the lists? >> > > Personally I find that we've got a quite complete set of features, so my > personal wishes would go towards improving what's there instead of > adding new features: > > - Performance tuning > > - Security audits > > - Easy installation. We've started work on that with MS4W and FGS, but > there is still lots of work to do. > > - Any tools that can make it easier for new users to get up to speed > with the software quickly. > > And finally, one new feature idea: > > - Ability to work in pre-canned-maps-mode: > > I'm sure you've all seen Google and its (obviously) pre-canned map > tiles. Well, back in 1999, before we found MapServer, that's the > direction in which we were going with webmapping at DMSG and Google > reminded me of this idea a few weeks ago. This idea was inspired from > what a few other sites were doing at the time so it's not new and I > can't take credit for inventing it. But then we found MapServer and it's > performance and robustness was just so impressive (compared to the > alternatives of those days) that we dropped this idea of pre-generating > the maps since that was not necessary any more for the types of sites > that we were working on. > > I think that one of MapServer's next challenges is to be able to serve > the needs of the high traffic sites that produce tens or hundreds of > millions of maps per month, always based on the same *static* street > data. If you generate the maps on the fly with a relatively complex > mapfile based on vector data with street labelling, etc, then you can > only get a few million maps per month per CPU. Imagine the server farm > you'd need for 100 million maps. > > OTOH, since the street data is static, you could pregenerate the maps as > tiled rasters for a number of preset scales, configure one raster layer > per scale, add a little bit of logic in MapServer to force it to use a > discrete number of scales and you're running. You can still plot points > on top of the map, do queries, or do anything else that MapServer was > doing before... you just don't render the static street data all the time. > > That would require lots of disk space in some cases, but disk space is > cheap as I keep being reminded... and for the cases where it's not > practical to pregenerate all the maps, I've also got some ideas for a > hybrid mode where the vector layers kick in if no raster tile was found > for the current map area. > > Combine that with a fastcgi (or persistent mapscript) that preloads the > mapfile and the raster tileindex in memory and you'd be flying! > > Daniel > -- > ------------------------------------------------------------ > Daniel Morissette dmorissette@dmsolutions.ca > DM Solutions Group http://www.dmsolutions.ca/ > ------------------------------------------------------------ > From zhox at 163.COM Thu Feb 17 05:00:14 2005 From: zhox at 163.COM (Xu Zhou) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: My first wish is that Mapserver can deal with INCLUDE directive in map file. From hfl at HOME.NL Thu Feb 17 16:30:19 2005 From: hfl at HOME.NL (huub fleuren) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: Message-ID: Hallo Xu and developers, XZ> My first wish is that Mapserver can deal with INCLUDE directive in map XZ> file. And then, while you're at it, an extension to GROUP so, that you could add a layer to 2 or more GROUPS without the necessity to define the layer twice Huub From dmorissette at DMSOLUTIONS.CA Thu Feb 17 16:52:44 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: <5284.212.238.227.182.1108626737.squirrel@212.238.227.182> Message-ID: Bart van den Eijnden wrote: > Whatever happened to the > integration of Mapserver and Label-EZ? > I don't know about Steve, but I haven't heard anything since you brought up this same question almost exactly 1 year ago: http://lists.gis.umn.edu/pipermail/mapserver-users/2004-February/010441.html Do you have a cron job that posts this question at the same date every year? Maybe I should setup a cron job at my end to always post the same reply at that date. ;) Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From dmorissette at DMSOLUTIONS.CA Thu Feb 17 22:18:23 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: Bug 1238 committed to CVS (avoid C++/C99 comments in source) Message-ID: FYI, I just applied the patch for bug 1238 to CVS. This is the patch submitted by Petter Reinholdtsen to replace all C++/C99 comments with C comments in the core source files. The patch was fairly easy to apply, but I couldn't manually inspect every block of code that was modified, so I am a bit worried that some block of code could have been disabled or broken by accident. If you notice odd behaviors with the new CVS version then please keep this in mind and look for the new comments. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From dmorissette at DMSOLUTIONS.CA Fri Feb 18 13:23:14 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: Bug 1238 committed to CVS (avoid C++/C99 comments in source) In-Reply-To: <42155E7F.5070207@dmsolutions.ca> Message-ID: Quick followup on this: Petter found a few instances of "http://" strings that were turned into partly commented lines in mapwcs.c and mapsvg.c. This is fixed in CVS now. If you built from CVS this morning then you should probably consider updating your source again. Daniel Daniel Morissette wrote: > FYI, I just applied the patch for bug 1238 to CVS. This is the patch > submitted by Petter Reinholdtsen to replace all C++/C99 comments with C > comments in the core source files. The patch was fairly easy to apply, > but I couldn't manually inspect every block of code that was modified, > so I am a bit worried that some block of code could have been disabled > or broken by accident. If you notice odd behaviors with the new CVS > version then please keep this in mind and look for the new comments. > > Daniel > -- > ------------------------------------------------------------ > Daniel Morissette dmorissette@dmsolutions.ca > DM Solutions Group http://www.dmsolutions.ca/ > ------------------------------------------------------------ > From arnulf.christl at CCGIS.DE Fri Feb 18 14:07:22 2005 From: arnulf.christl at CCGIS.DE (Arnulf Christl) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists In-Reply-To: <4213C96A.3050404@dmsolutions.ca> Message-ID: > I'm sure you've all seen Google and its (obviously) pre-canned map > tiles. [...] our story is exactly the same as Daniel told it - except we needed 3 years longer to understand what happened :-) [...] > Personally I find that we've got a quite complete set of features, so my > personal wishes would go towards improving what's there instead of > adding new features: [...] And again, I can just second what Daniel said. The installation is OK though, you already did a good job. What about security audits? That has to be done in the architecture and clients as i understood it?! If you need high security a java OWS Proxy would do the job. Why add this uninteresting, bothersome and tedious domain to MapServer? Docs and Demos: The docs and demos need improvement - but hey, who wants to write documents and prepare demo data? That said we officially announce to provide for an easy to use and extendable WMS demo with minimal data and minimal functionality (our 2 cents). Lately I had the chance to observe a beginner trying to get itasca to run - it was rather painful. There was a lot of talk on changing and improving docs. Has anything come out of that? Performance I: Are google maps really that cool? After some toying around I dont think so anymore. Again its just like Daniel said - they just discovered technology that we have left behind years ago. They just throw disc space and bandwidth at it and it works fine. But its static and when you really count the time it needs to get all those tiles though the pipe to your screen it alway takes longer than requesting one single map from an otimized MapServer. Its the last mile - you never get the maps all at once. To do a "benchmark" just count the seconds it takes to finish one screen. Something is fidgeting all the time and makes me nervous, thats all. All those tiles which are loaded on anticipatory obedience around the visible map just produce traffic. People would hate me for a client that did something like that. Its an extra 0f between 30 to 60% of what you really need. Its all about pychology of perception. Performance II: Slightly blushing we must admit that we do exactly the same as google maps and automatically rasterize vector data into tiles to increase performance. It works great! After the initial job of tiling the whole area (with MapServer) it gets slightly more sophisticated in that it automatically generates tiles for those areas where vectors have been modified. You only need a tag in the database each time an object is changed. Every now and then (or even triggered by the database) the bboxes of the tagged objects are intersected with the raster catalog and whatever tile is affected is renewed. Done. MapServer does this job perfectly, so I don't think anything much has to be done inside it. It is rather the architecture around it and metadata that can help. If this is interesting to anybody - it could be developed into a sleek side project. The zoom levels have to be preset in the client, MapServer shouldn't have to bother about that. Thinking about how to synchronize static MS maps and overlayed dynamic maps with an OGC client gives me headaches. We need to do this (crap) only because official German land register maps have to conform to a cartographic guideline from the mid 70s. To be able to satisfy these guidelines we need to overlay 12 WMS with between 5 and 15 layers each. That means each single map request calls 12 separate MapServ threads and each opens 5 to 10 connect/read on a PostgreSQL PostGIS box to render around 50 polygon styles, 200 line styles and 900 symbol classes. Typical database counts are between 10 and 100 million objects. Updates by the hour. That really rocks. 98% of all maps are requested at scales between 1:500 and 1:2500. The obvious thing to do is tile them. After that we still show them with MapServer, as there is nothing much faster or more stable or better standardized. Cartography: We are very interested in further improving cartographic functionality. Steve, Frank and Daniel saw some of it (and we have more for the next conference to discuss :-). That is something where none of the US GIS companies ever managed to live up to our standards. MapServer does! (with an odd trick here and there... see the document by Peter Freimuth about cartolines) If Cairo is a more powerful cartographic alternative couldn't it be included as an option? Then GD would be fast and Cairo would be nice, depending on what you need. The new web site: (where is it, will it be multilingual?). It would be extremly helpful if we could continue further develoment discussions there in wiki style. ...and then again: MapServer is a very stable, very fast and very professional software. Thanks to everybody involved! Best, Arnulf. -- ------------------------ Arnulf B. Christl ------------------------ http://www.ccgis.org http://www.mapbender.org ------------------------ From teb at MALLIT.FR.UMN.EDU Fri Feb 18 16:07:32 2005 From: teb at MALLIT.FR.UMN.EDU (Thomas E Burk) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: >The new web site: >(where is it, will it be multilingual?). It would be extremly helpful if >we could continue further develoment discussions there in wiki style. > We are working on defining document types and structures. It has multi-lingual capability. Some aspect of it will replace the wiki. Tom From pramsey at REFRACTIONS.NET Sun Feb 20 16:49:30 2005 From: pramsey at REFRACTIONS.NET (Paul Ramsey) Date: Fri Feb 8 14:55:43 2008 Subject: Access to *.gis.umn.edu Message-ID: For the last two weeks, my home computer has been blocked from access to machines in gis.umn.edu. For reference, my upstream router is 24.68.228.1. I can hit www.umn.edu though, so it does not appear to be university policy that is causing this. Any help from the administrators? I initially hoped it would just go away on its own, but it appears to be a permanent fixture. Thanks, Paul From mark at REFRACTIONS.NET Mon Feb 21 17:24:54 2005 From: mark at REFRACTIONS.NET (Mark Leslie) Date: Fri Feb 8 14:55:43 2008 Subject: PostGIS 1.0 support Message-ID: I finally have a patch for mappostgis.c to allow support for PostGIS1.0. I've tested it against 4.4.1 and all is well, but I'm having trouble getting head to compile on my test machine. The next PostGIS1.0 release candidate is waiting on me, so I was wondering if it would be appropriate to commit to 4.4.1 and get the candidate out while I resolve my issues. Any thought or reservations? Mark From bartvde at XS4ALL.NL Tue Feb 22 07:46:42 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri Feb 8 14:55:43 2008 Subject: release date for 4.4.2? Message-ID: Hi list, is there already an approximate release date for Mapserver 4.4.2? I can imagine quite a few useful fixes have been done already. Best regards, Bart From Tom.Kralidis at EC.GC.CA Tue Feb 22 09:03:26 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:43 2008 Subject: Error in building latest CVS Message-ID: Against mapgeos.c: usr/local/include -I/usr/local/include -I/usr/local/pgsql/include -I/usr/local/include ma pgeos.cpp -o mapgeos.o mapgeos.cpp:330: error: syntax error before `*' token make: *** [mapgeos.o] Error 1 From dmorissette at DMSOLUTIONS.CA Tue Feb 22 13:30:45 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: PostGIS 1.0 support In-Reply-To: <421A5FB6.5010302@refractions.net> Message-ID: Mark Leslie wrote: > I finally have a patch for mappostgis.c to allow support for > PostGIS1.0. I've tested it against 4.4.1 and all is well, but I'm > having trouble getting head to compile on my test machine. The next > PostGIS1.0 release candidate is waiting on me, so I was wondering if it > would be appropriate to commit to 4.4.1 and get the candidate out while > I resolve my issues. Any thought or reservations? > If you're confident that the patch doesn't break anything that used to be working in 4.4.1 then I'd say go ahead (hopefully the 4.5 patch will come soon after). Is there a bug for this already? If not then please create one, and quote the bug number in the CVS change log and in HISTORY.TXT. Thanks Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From dmorissette at DMSOLUTIONS.CA Tue Feb 22 13:33:42 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: release date for 4.4.2? In-Reply-To: <14133.212.238.227.182.1109076402.squirrel@212.238.227.182> Message-ID: Bart van den Eijnden wrote: > Hi list, > > is there already an approximate release date for Mapserver 4.4.2? I can > imagine quite a few useful fixes have been done already. > If there are no objections then perhaps we could release 4.4.2 later this week, once Mark has committed his PostGIS 1.0 patch? Let's say Wednesday afternoon if that works for everyone? Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From assefa at DMSOLUTIONS.CA Tue Feb 22 13:36:57 2005 From: assefa at DMSOLUTIONS.CA (Yewondwossen Assefa) Date: Fri Feb 8 14:55:43 2008 Subject: release date for 4.4.2? In-Reply-To: <421B7B06.8010400@dmsolutions.ca> Message-ID: No objection. Daniel Morissette wrote: > Bart van den Eijnden wrote: > >> Hi list, >> >> is there already an approximate release date for Mapserver 4.4.2? I can >> imagine quite a few useful fixes have been done already. >> > > If there are no objections then perhaps we could release 4.4.2 later > this week, once Mark has committed his PostGIS 1.0 patch? Let's say > Wednesday afternoon if that works for everyone? > > Daniel > -- > ------------------------------------------------------------ > Daniel Morissette dmorissette@dmsolutions.ca > DM Solutions Group http://www.dmsolutions.ca/ > ------------------------------------------------------------ > -- ---------------------------------------------------------------- Assefa Yewondwossen Software Analyst Email: assefa@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ---------------------------------------------------------------- From dmorissette at DMSOLUTIONS.CA Tue Feb 22 13:42:24 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: Error in building latest CVS In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F698@ecnwri1.ontario.int.ec.gc.ca> Message-ID: Kralidis,Tom [Burlington] wrote: > Against mapgeos.c: > > usr/local/include -I/usr/local/include -I/usr/local/pgsql/include > -I/usr/local/include ma > pgeos.cpp -o mapgeos.o > mapgeos.cpp:330: error: syntax error before `*' token > make: *** [mapgeos.o] Error 1 > There were a few problems when building without USE_GEOS. I have fixed them in CVS. Steve: I moved the #include "map.h" to the top of the file, before the #ifdef that contains all the other includes. Can you please confirm that this is not going to cause a problem since map.h used to be included last and now it's first. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From sgillies at FRII.COM Tue Feb 22 13:44:04 2005 From: sgillies at FRII.COM (Sean Gillies) Date: Fri Feb 8 14:55:43 2008 Subject: PostGIS 1.0 support In-Reply-To: Message-ID: On Feb 22, 2005, at 11:30 AM, Daniel Morissette wrote: > Mark Leslie wrote: >> I finally have a patch for mappostgis.c to allow support for >> PostGIS1.0. I've tested it against 4.4.1 and all is well, but I'm >> having trouble getting head to compile on my test machine. The next >> PostGIS1.0 release candidate is waiting on me, so I was wondering if >> it >> would be appropriate to commit to 4.4.1 and get the candidate out >> while >> I resolve my issues. Any thought or reservations? >> > > If you're confident that the patch doesn't break anything that used to > be working in 4.4.1 then I'd say go ahead (hopefully the 4.5 patch will > come soon after). Is there a bug for this already? If not then please > create one, and quote the bug number in the CVS change log and in > HISTORY.TXT. > > Thanks > > Daniel While we are talking about postgis, there are a couple of very bad mappostgis.c bugs that need attention. For example: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1199. Let's get this one fixed before 4.4.2, whadaya say? cheers, Sean -- Sean Gillies sgillies at frii dot com http://users.frii.com/sgillies From steve.lime at DNR.STATE.MN.US Tue Feb 22 14:20:41 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: Error in building latest CVS Message-ID: My bad, should've tested the non-GEOS case, I was just so darn happy to get something working last night I jumped the gun. Having map.h should not cause problems. Steve >>> Daniel Morissette 02/22/05 12:42 PM >>> Kralidis,Tom [Burlington] wrote: > Against mapgeos.c: > > usr/local/include -I/usr/local/include -I/usr/local/pgsql/include > -I/usr/local/include ma > pgeos.cpp -o mapgeos.o > mapgeos.cpp:330: error: syntax error before `*' token > make: *** [mapgeos.o] Error 1 > There were a few problems when building without USE_GEOS. I have fixed them in CVS. Steve: I moved the #include "map.h" to the top of the file, before the #ifdef that contains all the other includes. Can you please confirm that this is not going to cause a problem since map.h used to be included last and now it's first. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From steve.lime at DNR.STATE.MN.US Tue Feb 22 14:33:57 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: release date for 4.4.2? Message-ID: Fine by me... >>> Daniel Morissette 02/22/05 12:33 PM >>> Bart van den Eijnden wrote: > Hi list, > > is there already an approximate release date for Mapserver 4.4.2? I can > imagine quite a few useful fixes have been done already. > If there are no objections then perhaps we could release 4.4.2 later this week, once Mark has committed his PostGIS 1.0 patch? Let's say Wednesday afternoon if that works for everyone? Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From pramsey at REFRACTIONS.NET Tue Feb 22 14:37:10 2005 From: pramsey at REFRACTIONS.NET (Paul Ramsey) Date: Fri Feb 8 14:55:43 2008 Subject: PostGIS 1.0 support In-Reply-To: Message-ID: If you don't mind the patches in teh 4_4 branch, we don't mind applying them. there were some initial problems, but mark is regressing them all against some test cases now. Should be ready to apply everything if we get permission. P Sean Gillies wrote: > While we are talking about postgis, there are a couple of very bad > mappostgis.c bugs that need attention. For example: > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1199. Let's get this > one fixed before 4.4.2, whadaya say? > > cheers, > Sean > > -- > Sean Gillies > sgillies at frii dot com > http://users.frii.com/sgillies From steve.lime at DNR.STATE.MN.US Tue Feb 22 14:40:01 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: wishlists Message-ID: Those guys vanished of the face of the earth. Went so far as to create CVS accounts for them. (reminds me to suspend them) Haven't heard a peep since. Their challenges weren't technical as much as business related. I don't believe they ever figured out how to market the extension. Their price point was really quite high... Steve >>> Daniel Morissette 02/17/05 3:52 PM >>> Bart van den Eijnden wrote: > Whatever happened to the > integration of Mapserver and Label-EZ? > I don't know about Steve, but I haven't heard anything since you brought up this same question almost exactly 1 year ago: http://lists.gis.umn.edu/pipermail/mapserver-users/2004-February/010441.html Do you have a cron job that posts this question at the same date every year? Maybe I should setup a cron job at my end to always post the same reply at that date. ;) Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From dmorissette at DMSOLUTIONS.CA Tue Feb 22 17:56:58 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: PostGIS 1.0 support In-Reply-To: <421B89E6.9080702@refractions.net> Message-ID: Paul Ramsey wrote: > If you don't mind the patches in teh 4_4 branch, we don't mind applying > them. there were some initial problems, but mark is regressing them all > against some test cases now. Should be ready to apply everything if we > get permission. > Seems that Sean would like to see those problems fixed, and I don't mind them either as long as they don't break anything else... so unless you hear objections from someone else on this list then I'd say go ahead. Do you think this can be done for a 4.4.2 release tomorrow? If not then please let us know and we'll try to plan the 4.4.2 release around that. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From Tom.Kralidis at EC.GC.CA Tue Feb 22 18:27:57 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:43 2008 Subject: ASP wrapper and HTTP GET requests Message-ID: Hi, There seems to be a problem with the ASP wrapper example provided for hiding the mapfile from: http://mapserver.gis.umn.edu/doc44/wms-server-howto.html#onlineresourceu rl I've filed a bug against this: http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1253 The wrapper script doesn't support POST requests. Are there any ASP gurus out there who can tweak the example so that it can recognize when a POST request comes in and pass it as such? Thanks ..Tom From jerry.pisk at GMAIL.COM Tue Feb 22 20:46:03 2005 From: jerry.pisk at GMAIL.COM (Jerry Pisk) Date: Fri Feb 8 14:55:43 2008 Subject: ASP wrapper and HTTP GET requests In-Reply-To: <2576812186CDD411BF1500508B6DCE950972F6C7@ecnwri1.ontario.int.ec.gc.ca> Message-ID: You can easily change that sample ASP page to support POST requests, replace the query string read with this: Select Case Request.ServerVariables("REQUEST_METHOD") Case "GET" strRequest = Request.QueryString Case "POST" strRequest = Request.Form Case Else ' Handle other methods here End Select The problem in bug 1253 is not related to this though, it's caused by a missing template in a mapfile as far as I can tell. Jerry Pisk On Tue, 22 Feb 2005 18:27:57 -0500, Kralidis,Tom [Burlington] wrote: > Hi, > > There seems to be a problem with the ASP wrapper example provided for > hiding the mapfile from: > > http://mapserver.gis.umn.edu/doc44/wms-server-howto.html#onlineresourceu > rl > > I've filed a bug against this: > > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1253 > > The wrapper script doesn't support POST requests. > > Are there any ASP gurus out there who can tweak the example so that it > can recognize when a POST request comes in and pass it as such? > > Thanks > > ..Tom > From Tom.Kralidis at EC.GC.CA Tue Feb 22 22:12:37 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:43 2008 Subject: ASP wrapper and HTTP GET requests Message-ID: Thanks for the info. Bug 1253 does not have a template problem. What's happening is that the POST request is sent to ASP script, which passes as a GET request with no arguments. Can someone try this out and verify this works? Also see comment line below in the code: <% Server.ScriptTimeout = 360 Select Case Request.ServerVariables("REQUEST_METHOD") Case "GET" strRequest = Request.QueryString Case "POST" strRequest = Request.Form End Select strRequest = Request.ServerVariables("QUERY_STRING") strURL = "http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\WMS\mymap.ma p&" & strRequest Dim objHTTP Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP") ' ' will this line below work for POST requests? ' objHTTP.open "GET", strURL, false objHTTP.send "" Response.ContentType = objHTTP.getResponseHeader("content-type") Response.BinaryWrite objHTTP.responseBody Set objHTTP = Nothing %> ..Tom > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Jerry Pisk > Sent: Tuesday, 22 February, 2005 20:46 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] ASP wrapper and HTTP GET requests > > > You can easily change that sample ASP page to support POST > requests, replace the query string read with this: > > Select Case Request.ServerVariables("REQUEST_METHOD") > Case "GET" strRequest = Request.QueryString > Case "POST" strRequest = Request.Form > Case Else ' Handle other methods here > End Select > > The problem in bug 1253 is not related to this though, it's > caused by a missing template in a mapfile as far as I can tell. > > Jerry Pisk > > On Tue, 22 Feb 2005 18:27:57 -0500, Kralidis,Tom [Burlington] > wrote: > > Hi, > > > > There seems to be a problem with the ASP wrapper example > provided for > > hiding the mapfile from: > > > > > http://mapserver.gis.umn.edu/doc44/wms-server-howto.html#onlineresourc > > eu > > rl > > > > I've filed a bug against this: > > > > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1253 > > > > The wrapper script doesn't support POST requests. > > > > Are there any ASP gurus out there who can tweak the example > so that it > > can recognize when a POST request comes in and pass it as such? > > > > Thanks > > > > ..Tom > > > From bfraser at GEOANALYTIC.COM Wed Feb 23 10:43:47 2005 From: bfraser at GEOANALYTIC.COM (Brent Fraser) Date: Fri Feb 8 14:55:43 2008 Subject: ASP wrapper and HTTP GET requests Message-ID: Tom, Your code is pretty close. I made one minor change by commenting-out the second strRequest assignment: <% Server.ScriptTimeout = 360 Select Case Request.ServerVariables("REQUEST_METHOD") Case "GET" strRequest = Request.QueryString Case "POST" strRequest = Request.Form End Select ' Remove the following line: ' strRequest = Request.ServerVariables("QUERY_STRING") strURL = "http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\workshop\itasca. map&" & strRequest Dim objHTTP Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP") ' ' will this line below work for POST requests? YES! ' objHTTP.open "GET", strURL, false objHTTP.send "" Response.ContentType = objHTTP.getResponseHeader("content-type") Response.BinaryWrite objHTTP.responseBody Set objHTTP = Nothing %> This works with the Itasca demo in workshop.zip (with index.html using "GET" or "POST" ); I haven't tested it with WMS yet. Brent Fraser ----- Original Message ----- From: "Kralidis,Tom [Burlington]" To: Sent: Tuesday, February 22, 2005 8:12 PM Subject: Re: [UMN_MAPSERVER-DEV] ASP wrapper and HTTP GET requests Thanks for the info. Bug 1253 does not have a template problem. What's happening is that the POST request is sent to ASP script, which passes as a GET request with no arguments. Can someone try this out and verify this works? Also see comment line below in the code: <% Server.ScriptTimeout = 360 Select Case Request.ServerVariables("REQUEST_METHOD") Case "GET" strRequest = Request.QueryString Case "POST" strRequest = Request.Form End Select strRequest = Request.ServerVariables("QUERY_STRING") strURL = "http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\WMS\mymap.ma p&" & strRequest Dim objHTTP Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP") ' ' will this line below work for POST requests? ' objHTTP.open "GET", strURL, false objHTTP.send "" Response.ContentType = objHTTP.getResponseHeader("content-type") Response.BinaryWrite objHTTP.responseBody Set objHTTP = Nothing %> ..Tom > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Jerry Pisk > Sent: Tuesday, 22 February, 2005 20:46 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] ASP wrapper and HTTP GET requests > > > You can easily change that sample ASP page to support POST > requests, replace the query string read with this: > > Select Case Request.ServerVariables("REQUEST_METHOD") > Case "GET" strRequest = Request.QueryString > Case "POST" strRequest = Request.Form > Case Else ' Handle other methods here > End Select > > The problem in bug 1253 is not related to this though, it's > caused by a missing template in a mapfile as far as I can tell. > > Jerry Pisk > > On Tue, 22 Feb 2005 18:27:57 -0500, Kralidis,Tom [Burlington] > wrote: > > Hi, > > > > There seems to be a problem with the ASP wrapper example > provided for > > hiding the mapfile from: > > > > > http://mapserver.gis.umn.edu/doc44/wms-server-howto.html#onlineresourc > > eu > > rl > > > > I've filed a bug against this: > > > > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1253 > > > > The wrapper script doesn't support POST requests. > > > > Are there any ASP gurus out there who can tweak the example > so that it > > can recognize when a POST request comes in and pass it as such? > > > > Thanks > > > > ..Tom > > > From ed at TOPOZONE.COM Wed Feb 23 11:04:28 2005 From: ed at TOPOZONE.COM (Ed McNierney) Date: Fri Feb 8 14:55:43 2008 Subject: ASP wrapper and HTTP GET requests Message-ID: Tom - I would say this isn't a bug in that script - you're trying to do something the script isn't designed to do. ASP parses both the querystring parameters and form variables into two separate collections, each of which can be accessed individually (just as one normally accesses individual CGI parameters). For example, if a parameter named "map" is passed EITHER on the querystring OR as a form parameter, the statement: foo = Request ("map") Will assign the value of that parameter to the variable "foo". The statement Request.Form("map") will refer specifically to the POST varaible. In addition, ASP makes the contents of the original URL querystring available by referring to the entire QueryString collection as Request.QueryString. The equivalent unparsed string for form variables is Request.Form, as you seem to have already discovered. Using Request.QueryString for a GET and Request.Form for a POST should do what you expect. Your code below does that in the CASE statement, but then has an extra assignment to strRequest that you obviously don't want. There may be some confusion because ASP also provides access to all HTTP header information through objects in the Request.ServerVariables collection, like cookies, user agent ID, authentication tokens, etc., and the QUERY_STRING is also accessible as one of those variables. Your question about the ServerXMLHTTP call isn't terribly clear - your code is making a GET request to the target WMS server, so I don't quite understand your "will this work for POST" question. You're not making a POST request - if you want to, you need to set up the parameters appropriately. While I encourage new learning opportunities, I would also encourage you to try to find someone with a little more ASP expertise. These are very basic questions/issues you're running into, and if you intend to use this code in any sort of production environment it would be a good idea to have someone on hand with a little stronger familiarity with what you're doing. - Ed Ed McNierney President and Chief Mapmaker TopoZone.com / Maps a la carte, Inc. 73 Princeton Street, Suite 305 North Chelmsford, MA 01863 ed@topozone.com (978) 251-4242 -----Original Message----- From: UMN MapServer Developers List [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Kralidis,Tom [Burlington] Sent: Tuesday, February 22, 2005 10:13 PM To: MAPSERVER-DEV@LISTS.UMN.EDU Subject: Re: [UMN_MAPSERVER-DEV] ASP wrapper and HTTP GET requests Thanks for the info. Bug 1253 does not have a template problem. What's happening is that the POST request is sent to ASP script, which passes as a GET request with no arguments. Can someone try this out and verify this works? Also see comment line below in the code: <% Server.ScriptTimeout = 360 Select Case Request.ServerVariables("REQUEST_METHOD") Case "GET" strRequest = Request.QueryString Case "POST" strRequest = Request.Form End Select strRequest = Request.ServerVariables("QUERY_STRING") strURL = "http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\WMS\mymap.ma p&" & strRequest Dim objHTTP Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP") ' ' will this line below work for POST requests? ' objHTTP.open "GET", strURL, false objHTTP.send "" Response.ContentType = objHTTP.getResponseHeader("content-type") Response.BinaryWrite objHTTP.responseBody Set objHTTP = Nothing %> ..Tom > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Jerry Pisk > Sent: Tuesday, 22 February, 2005 20:46 > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] ASP wrapper and HTTP GET requests > > > You can easily change that sample ASP page to support POST requests, > replace the query string read with this: > > Select Case Request.ServerVariables("REQUEST_METHOD") > Case "GET" strRequest = Request.QueryString > Case "POST" strRequest = Request.Form > Case Else ' Handle other methods here End Select > > The problem in bug 1253 is not related to this though, it's caused by > a missing template in a mapfile as far as I can tell. > > Jerry Pisk > > On Tue, 22 Feb 2005 18:27:57 -0500, Kralidis,Tom [Burlington] > wrote: > > Hi, > > > > There seems to be a problem with the ASP wrapper example > provided for > > hiding the mapfile from: > > > > > http://mapserver.gis.umn.edu/doc44/wms-server-howto.html#onlineresourc > > eu > > rl > > > > I've filed a bug against this: > > > > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1253 > > > > The wrapper script doesn't support POST requests. > > > > Are there any ASP gurus out there who can tweak the example > so that it > > can recognize when a POST request comes in and pass it as such? > > > > Thanks > > > > ..Tom > > > From Tom.Kralidis at EC.GC.CA Wed Feb 23 11:14:52 2005 From: Tom.Kralidis at EC.GC.CA (Kralidis,Tom [Burlington]) Date: Fri Feb 8 14:55:43 2008 Subject: ASP wrapper and HTTP GET requests Message-ID: > -----Original Message----- > From: Ed McNierney [mailto:ed@topozone.com] > Sent: Wednesday, 23 February, 2005 11:04 > To: Kralidis,Tom [Burlington]; MAPSERVER-DEV@LISTS.UMN.EDU > Subject: RE: [UMN_MAPSERVER-DEV] ASP wrapper and HTTP GET requests > > > Tom - > > I would say this isn't a bug in that script - you're trying > to do something the script isn't designed to do. > > ASP parses both the querystring parameters and form variables > into two separate collections, each of which can be accessed > individually (just as one normally accesses individual CGI > parameters). For example, if a parameter named "map" is > passed EITHER on the querystring OR as a form parameter, the > statement: > > foo = Request ("map") > > Will assign the value of that parameter to the variable > "foo". The statement Request.Form("map") will refer > specifically to the POST varaible. > > In addition, ASP makes the contents of the original URL > querystring available by referring to the entire QueryString > collection as Request.QueryString. The equivalent unparsed > string for form variables is Request.Form, as you seem to > have already discovered. > > Using Request.QueryString for a GET and Request.Form for a > POST should do what you expect. Your code below does that in > the CASE statement, but then has an extra assignment to > strRequest that you obviously don't want. > > There may be some confusion because ASP also provides access > to all HTTP header information through objects in the > Request.ServerVariables collection, like cookies, user agent > ID, authentication tokens, etc., and the QUERY_STRING is also > accessible as one of those variables. > > Your question about the ServerXMLHTTP call isn't terribly > clear - your code is making a GET request to the target WMS > server, so I don't quite understand your "will this work for > POST" question. You're not making a POST request - if you > want to, you need to set up the parameters appropriately. > > While I encourage new learning opportunities, I would also > encourage you to try to find someone with a little more ASP > expertise. These are very basic questions/issues you're > running into, and if you intend to use this code in any sort > of production environment it would be a good idea to have > someone on hand with a little stronger familiarity with what > you're doing. > Thanks for the info. The code posted below is as a result of email replies just to me so I've posted below. You are correct, an ASP guru is what is needed here. Can anyone apply the correct changes to the code? At any rate, note that the code below works. ..Tom > - Ed > > Ed McNierney > President and Chief Mapmaker > TopoZone.com / Maps a la carte, Inc. > 73 Princeton Street, Suite 305 > North Chelmsford, MA 01863 > ed@topozone.com > (978) 251-4242 > > > -----Original Message----- > From: UMN MapServer Developers List > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] > On Behalf Of Kralidis,Tom [Burlington] > Sent: Tuesday, February 22, 2005 10:13 PM > To: MAPSERVER-DEV@LISTS.UMN.EDU > Subject: Re: [UMN_MAPSERVER-DEV] ASP wrapper and HTTP GET requests > > Thanks for the info. > > Bug 1253 does not have a template problem. What's happening > is that the POST request is sent to ASP script, which passes > as a GET request with no arguments. > > Can someone try this out and verify this works? Also see > comment line below in the code: > > <% > Server.ScriptTimeout = 360 > Select Case Request.ServerVariables("REQUEST_METHOD") > Case "GET" strRequest = Request.QueryString > Case "POST" strRequest = Request.Form > End Select > strRequest = Request.ServerVariables("QUERY_STRING") > strURL = > "http://myserver/cgi-bin/mapserv.exe?map=C:\Inetpub\wwwroot\WM > S\mymap.ma > p&" & strRequest > Dim objHTTP > Set objHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP") > ' > ' will this line below work for POST requests? > ' > objHTTP.open "GET", strURL, false > > objHTTP.send "" > Response.ContentType = objHTTP.getResponseHeader("content-type") > Response.BinaryWrite objHTTP.responseBody > Set objHTTP = Nothing > %> > > ..Tom > > > > > -----Original Message----- > > From: UMN MapServer Developers List > > [mailto:MAPSERVER-DEV@LISTS.UMN.EDU] On Behalf Of Jerry Pisk > > Sent: Tuesday, 22 February, 2005 20:46 > > To: MAPSERVER-DEV@LISTS.UMN.EDU > > Subject: Re: [UMN_MAPSERVER-DEV] ASP wrapper and HTTP GET requests > > > > > > You can easily change that sample ASP page to support POST requests, > > replace the query string read with this: > > > > Select Case Request.ServerVariables("REQUEST_METHOD") > > Case "GET" strRequest = Request.QueryString > > Case "POST" strRequest = Request.Form > > Case Else ' Handle other methods here End Select > > > > The problem in bug 1253 is not related to this though, it's > caused by > > a missing template in a mapfile as far as I can tell. > > > > Jerry Pisk > > > > On Tue, 22 Feb 2005 18:27:57 -0500, Kralidis,Tom [Burlington] > > wrote: > > > Hi, > > > > > > There seems to be a problem with the ASP wrapper example > > provided for > > > hiding the mapfile from: > > > > > > > > > http://mapserver.gis.umn.edu/doc44/wms-server-howto.html#onlineresourc > > > eu > > > rl > > > > > > I've filed a bug against this: > > > > > > http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1253 > > > > > > The wrapper script doesn't support POST requests. > > > > > > Are there any ASP gurus out there who can tweak the example > > so that it > > > can recognize when a POST request comes in and pass it as such? > > > > > > Thanks > > > > > > ..Tom > > > > > > From floerke at DOCTRONIC.DE Fri Feb 25 04:43:30 2005 From: floerke at DOCTRONIC.DE (Holger Floerke) Date: Fri Feb 8 14:55:43 2008 Subject: PHP/mapscript use gdFree instead of free Message-ID: Dear mapserver developers, I had to compile mapserver and php/mapscript on my own (sometimes a painful task ;^) and found an improvement (or bug or feature) of the php/mapscript code within php_mapscript.c. In function "php3_ms_img_saveImage" you use iptr = (void *)msSaveImageBufferGD(im->img.gd, &size, im->format); to allocate a pointer to the buffer of the image and use free(iptr); to free the memory. My mapscript module crashes while freeing the pointer. I had a look at the gd documentation and found the follwing hint """ The caller must invoke gdFree(), not free(), unless the caller is absolutely certain that the same implementations of malloc, free, etc. are used both at library build time and at application build time. """ I replaces free(iptr) with gdFree(iptr) and everything works fine. My bgd.dll appears to use another implementation for malloc/free. Maybe I made a mistake during the configuration/compilation of php_mapscript.dll, but I think it's better to use gdFree for safety. HolgeR From fwarmerdam at GMAIL.COM Fri Feb 25 09:11:57 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:43 2008 Subject: release date for 4.4.2? In-Reply-To: <421B7B06.8010400@dmsolutions.ca> Message-ID: On Tue, 22 Feb 2005 13:33:42 -0500, Daniel Morissette wrote: > If there are no objections then perhaps we could release 4.4.2 later > this week, once Mark has committed his PostGIS 1.0 patch? Let's say > Wednesday afternoon if that works for everyone? Daniel, I didn't notice any 4.4.2 release announcement, so I would like to request a slight deferment till I fix bug 1118. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From mikel_maron at YAHOO.COM Fri Feb 25 09:09:34 2005 From: mikel_maron at YAHOO.COM (Mikel Maron) Date: Fri Feb 8 14:55:43 2008 Subject: mapserver, flash, and worldkit Message-ID: Hello Developers Wanted to write an introduction and solicit feedback on some ideas I have for mapserver. My name is Mikel Maron, independent developer based in the UK, and most of my time orbits around projects with worldKit. worldKit is a light weight web mapping application designed for non-specialists, runs in Flash, and configured by XML. [http://brainoff.com/worldkit/]. It's not open source, but is free to use for any not-for-profit. I've become interested in mapserver for a few reasons: ogr support to read VMap0 data and flash output gives potential for worldKit users to incorporate all sorts of vector layers; also I think the worldKit interface could be valuable to other mapserver applications, and it enables geolocated rdf/rss data sources to be mixed into mapserver. I've built mapserver with flash support, and added a bit of code to support worldkit. This url is the first result of a bit of hacking and experimentation (it might take a minute for the river layer to load). [http://brainoff.com/mapserver/mapserv.cgi?map=/home/mikelmaron/brainoff.com/mapserver/fmv/w.map] It's been very simple to implement. Basically, I have mapserver writing another file called config.xml for worldkit, which references the url of each swf layer. What I envision is another map file option, which will trigger the production of the worldkit config file. Besides the layers, there are many other user configurations to control look and feel of the application. Without knowing the details, my thought is to make config.xml a mapserver template, and mapserver would insert the layer references, extents, etc. Also, I'd be interested in adding a bit of code to make layer elements addressable to worldKit. So, as a sanity check, does this sound reasonable? Would this patch likely be incorporated, and what is that process? Could this be added into mapswf.c, or better in another file? Thanks for any suggestions. Looking forward to contributing. Mikel ps When building mapswf.c on Debian, in calls to ming functions, I had to cast references to ming objects like SWFShape, SWFButton, etc. to the base class SWFCharacter. Not sure if it's something in my setup, or a bug. If it's a bug, happy to pass on the patch with casting. From dmorissette at DMSOLUTIONS.CA Fri Feb 25 10:05:32 2005 From: dmorissette at DMSOLUTIONS.CA (Daniel Morissette) Date: Fri Feb 8 14:55:43 2008 Subject: release date for 4.4.2? In-Reply-To: <931f8ea905022506111cc2e4e8@mail.gmail.com> Message-ID: Frank Warmerdam wrote: > > I didn't notice any 4.4.2 release announcement, so I would like > to request a slight deferment till I fix bug 1118. > The release fell through the cracks. Please let us know when your bugfix is ready. Daniel -- ------------------------------------------------------------ Daniel Morissette dmorissette@dmsolutions.ca DM Solutions Group http://www.dmsolutions.ca/ ------------------------------------------------------------ From ender at UPSTATE-CA.COM Fri Feb 25 09:48:27 2005 From: ender at UPSTATE-CA.COM (ender@UPSTATE-CA.COM) Date: Fri Feb 8 14:55:43 2008 Subject: [Fwd: ] Message-ID: I don't know if anyone else has caught this when including geos with mapserver, but configure has an error when calling geos-config. It is present in 4.4.0, and 4.4.1. Maybe even before... configure.in currently: 1010: GEOS_INCDIR=`$GEOS_CONFIG --include` 1034: GEOS_INCDIR=`$GEOS_CONFIG --include` these should be: 1010: GEOS_INCDIR=`$GEOS_CONFIG --includes` 1034: GEOS_INCDIR=`$GEOS_CONFIG --includes` I keep having to fix the configure.in and run autoconf. Just thought this might be able to be fixed before 4.4.2. -Aaron Stafford From pere at HUNGRY.COM Fri Feb 25 14:25:11 2005 From: pere at HUNGRY.COM (Petter Reinholdtsen) Date: Fri Feb 8 14:55:43 2008 Subject: PHP/mapscript use gdFree instead of free In-Reply-To: (Holger Floerke's message of "Fri, 25 Feb 2005 03:43:30 -0600") Message-ID: [Holger Floerke] > I replaces free(iptr) with gdFree(iptr) and everything works fine. My > bgd.dll appears to use another implementation for malloc/free. Maybe I made > a mistake during the configuration/compilation of php_mapscript.dll, but I > think it's better to use gdFree for safety. Sounds like something you should report to to make sure it isn't forgotten. From bartvde at XS4ALL.NL Mon Feb 28 06:21:44 2005 From: bartvde at XS4ALL.NL (Bart van den Eijnden) Date: Fri Feb 8 14:55:43 2008 Subject: FastCGI and HTTP POST Message-ID: Hi list, did anybody test HTTP POST against a Mapserver FastCGI? We are receiving an error message containing "POST body is short" in FastCGI mode, in CGI mode there is no problem. Is HTTP POST supported in FastCGI mode? cgiutil.c: if ( (int) fread(data, 1, data_max, stdin) < data_max ) { msIO_printf("Content-type: text/html%c%c",10,10); msIO_printf("POST body is short\n"); exit(1); Best regards, Bart From fwarmerdam at GMAIL.COM Mon Feb 28 09:44:03 2005 From: fwarmerdam at GMAIL.COM (Frank Warmerdam) Date: Fri Feb 8 14:55:43 2008 Subject: FastCGI and HTTP POST In-Reply-To: <21753.212.238.227.182.1109589704.squirrel@212.238.227.182> Message-ID: On Mon, 28 Feb 2005 12:21:44 +0100, Bart van den Eijnden wrote: > Hi list, > > did anybody test HTTP POST against a Mapserver FastCGI? > > We are receiving an error message containing "POST body is short" in > FastCGI mode, in CGI mode there is no problem. > > Is HTTP POST supported in FastCGI mode? > > cgiutil.c: > > if ( (int) fread(data, 1, data_max, stdin) < data_max ) { > msIO_printf("Content-type: text/html%c%c",10,10); > msIO_printf("POST body is short\n"); > exit(1); Bart, Yikes, I see that FastCGI mode does *not* support post mode. If you can file a bug report against this I could try and fix it. However, the msIO_* stuff hasn't been used much for reading from the stdin pipe so I might end up only fixing this in 4.5 to avoid messing up the 4.4.x. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent From steve.lime at DNR.STATE.MN.US Mon Feb 28 10:46:04 2005 From: steve.lime at DNR.STATE.MN.US (Steve Lime) Date: Fri Feb 8 14:55:43 2008 Subject: [Fwd: ] Message-ID: It's been fixed in 4.5 (there's a bug filed already), and shouldn't be an issue with earlier releases since GEOS support is vaporware in them- that is, don't compile with it. The GEOS support is now being added to 4.5 and should provide some nice features soon. Steve >>> 02/25/05 8:48 AM >>> I don't know if anyone else has caught this when including geos with mapserver, but configure has an error when calling geos-config. It is present in 4.4.0, and 4.4.1. Maybe even before... configure.in currently: 1010: GEOS_INCDIR=`$GEOS_CONFIG --include` 1034: GEOS_INCDIR=`$GEOS_CONFIG --include` these should be: 1010: GEOS_INCDIR=`$GEOS_CONFIG --includes` 1034: GEOS_INCDIR=`$GEOS_CONFIG --includes` I keep having to fix the configure.in and run autoconf. Just thought this might be able to be fixed before 4.4.2. -Aaron Stafford