Re: [mapserver-users] Problem with ANGLE FOLLOW
Try lowering the BUFFER number? ... Good idea. But even changing to BUFFER 0 didn't change anything ... Problem is still there. Benedikt TC Haddad tchad...@gmail.com schrieb am 03.12.2012 13:54:56: TC Haddad tchad...@gmail.com 03.12.2012 13:55 An umn...@hydrotec.de umn...@hydrotec.de Kopie Thema Re: [mapserver-users] Problem with ANGLE FOLLOW Try lowering the BUFFER number? If each label has a big buffer, then less labels can fit... Tanya On Dec 3, 2012, at 2:56 AM, umn...@hydrotec.de wrote: Hi I'm using ANGLE-FOLLOW in Mapserver 6.2 to label lines. Unfortunately only 5 of 12 features are labeld. I attach an example with data and mapfile. It can be used with shp2img -m example.map -o out.png All features are drawn, but most of them are not labeld, although there should be enough space for all labels. (To activate this example, one has to add arialbd.ttf in the test-directory. I didn't attach this one, because of size-limits in this mailing-list...) Without ANGLE FOLLOW all labels are drawn. Benedikt #Layerdefinition: LAYER NAME Striche TYPE LINE STATUS ON DEBUG 5 TEMPLATE dummy.html TOLERANCE 0 DATA Striche LABELITEM name CLASS NAME Hauptsammler LABEL COLOR 0 0 0 OUTLINECOLOR 255 255 255 OUTLINEWIDTH 6 TYPE truetype SIZE 5 MINDISTANCE 0 ANGLE FOLLOW FORCE TRUE FONT arial-bold BUFFER 10 END STYLE OUTLINECOLOR 0 0 0 WIDTH 3 PATTERN 5 5 END LINECAP BUTT END END END (See attached file: missinglabel.zip) missinglabel.zip ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Problem with ANGLE FOLLOW
@Christy Nieman and @Olivier Courtin: Thank you very much! This solved the issue. I tried MAXOVERLAPANGLE shameless big number and all labels were drawn. We'll read the blog to find a reasonable solution. Thank's Benedikt mapserver-users-boun...@lists.osgeo.org schrieb am 03.12.2012 15:35:20: Olivier Courtin olivier.cour...@gmail.com Gesendet von: mapserver-users-boun...@lists.osgeo.org 03.12.2012 15:35 An mapserver-users@lists.osgeo.org Kopie Thema Re: [mapserver-users] Problem with ANGLE FOLLOW Hi, For same kind of need (i.e hydrologic line to label), i've found that: - Your lines must be long enough to allow the label to fit on (seems already your case, as it works for you without ANGLE FOLLOW) - You have to increase MAXOVERLAPANGLE property - Your lines have to be as smooth as possible Below a sample of such a thing with two layers, one with the data itself and one another using a generalization trought PostGIS ST_Simplify to help the geometry to be smoother enough LAYER NAME label METADATA ows_title Label des cours d'eau Carthage AERMC ows_extent 573401 6050407 1242369 6811885 ows_featureid gid END PROJECTION init=epsg:2154 END TYPE line STATUS on DATA geom from (SELECT gid, ST_simplify(geom, 200) As geom , toponyme, classe::integer FROM aermc.cours_eau WHERE toponyme IS NOT NULL) AS foo using unique gid using srid=2154 CONNECTIONTYPE postgis CONNECTION host= port=5432 dbname= user= LABELITEM toponyme CLASSITEM classe CLASS EXPRESSION ([classe] = 2) LABEL COLOR 0 0 0 OUTLINECOLOR 210 210 210 TYPE TRUETYPE FONT vera SIZE 10 ANTIALIAS TRUE POSITION UC ANGLE FOLLOW PARTIALS FALSE MINFEATURESIZE auto REPEATDISTANCE 500 MAXOVERLAPANGLE 45 END END CLASS EXPRESSION ([classe] = 4) LABEL COLOR 30 30 30 OUTLINECOLOR 210 210 210 TYPE TRUETYPE FONT vera SIZE 8 ANTIALIAS TRUE POSITION UC ANGLE FOLLOW PARTIALS FALSE MINFEATURESIZE auto MAXOVERLAPANGLE 40 END END CLASS LABEL COLOR 60 60 60 OUTLINECOLOR 210 210 210 TYPE TRUETYPE FONT vera SIZE 8 ANTIALIAS TRUE POSITION UC ANGLE FOLLOW PARTIALS FALSE MINFEATURESIZE auto MAXOVERLAPANGLE 40 END END END LAYER NAME cours_eau METADATA ows_title Cours d'eau Carthage ows_extent 573401 6050407 1242369 6811885 ows_featureid gid END PROJECTION init=epsg:2154 END TYPE line STATUS on DATA geom from (SELECT gid, geom , classe::integer FROM aermc.cours_eau WHERE toponyme IS NOT NULL) AS foo using unique gid using srid=2154 CONNECTIONTYPE postgis CONNECTION host= port=5432 dbname= user= CLASSITEM classe CLASS EXPRESSION ([classe] = 2) STYLE COLOR 33 33 210 WIDTH 5 END END CLASS EXPRESSION ([classe] = 4) STYLE COLOR 66 66 210 WIDTH 3 END END CLASS STYLE COLOR 99 99 210 WIDTH 1 END END END HTH, -- Olivier___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver 6.2 with proj 4.7
Hi I tried to compile Mapserver 6.2 with proj 4.7. I'm having a problem with a function called pj_clear_initcache As far as I can see, this function was introduced in proj 4.8 and is not part of proj 4.7. In Mapserver 6.2 maputil.c has code # if PJ_VERSION = 470 pj_clear_initcache(); # endif ... #endif where Mapserver 6.0 used. # if PJ_VERSION = 480 pj_clear_initcache(); # endif ... #endif I changed the # if PJ_VERSION back to 6.0... Benedikt proj_api in 4.7: http://svn.osgeo.org/metacrs/proj/branches/4.7/proj/src/proj_api.h proj_api in 4.8: http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/src/proj_api.h ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Bug in Oracle-Spatial-Support
Hi We are using Mapserver 6.0.3 We think there is a serious problem in the TRY-Method of maporaclespatial.c SHORT DIAGNOSIS: I think there is a serious problem in the TRY-Method of maporaclespatial.c. After the first error in the msOracleSpatialHandler this method will always return 0, which indicates an error. Therefore mapserver won't work with this msOracleSpatialHandler after the first OCI-error occured with it. COMPLEX DIAGNOSIS: A testcase where this becomes a problem is 1. Mapfile with 2 layers from the same Oracle-Spatial-Database 2. Java-Binding with mapObj map = new mapObj(small.map); layerObj gemLayer = map.getLayerByName(Gemeinden); gemLayer.queryByAttributes(map, null, Gemeinde_id=2, mapscript .MS_SINGLE); imageObj img = map.drawQuery(); The layer Gemeinde must be the second layer. This will fail with the message: [Fri Aug 03 10:35:58 2012].64000 msOracleSpatialLayerGetShape(): OracleSpatial error. Shape type is null... this probably means a record number was requested that could not have beeen in a result set (as returned by NextShape). This message occurs while drawing the query-layer (of Gemeinden). This message indicates, that there is an error on converting a Spatial-Geometry to a Mapserver-Geometry in osGetOrdinates. Inside osGetOrdinates there is an OCI-call surrounded with TRY and this TRY returns 0/error. In reality the OCI-error already occured while drawing another layer, which used the same msOracleSpatialHandler. And *every* layer will cause at least one OCI-Error in msOracleSpatialLayerNextShape when reaching the end of the Cursor! THERAPY: We are not quite shure what to do. Option 1: In TRY remove the if (hand-last_oci_status == MS_FAILURE) ... statement. Since sequences of OCI-Calls are usually made with TRY() TRY() ... this statement seems superflous. Option 2: Reset hand-last_oci_status to MS_SUCCESS often. Example: Reset it in msOracleSpatialLayerNextShape Example: Rest at the beginning of osGetOrdinates Any of these patches will solve the problem of the testcase. I'm note shure, how to fix this general problem best. Could somebody take care? This one is a serious obstacle on using mapserver. We looked at Mapserver 6.2-Code. The problematic lines of codes seem to be unchanged. Bye Benedikt ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Antwort: Re: Mapserver 6: Oracle layerObj.queryByIndex
Hi Thomas The Single Query Issue is complex. I'll try to break this one down, because I think this one seams to be quite obvious and the code is unchanged in 6.2.0 beta1 DESCRIPTION: The function msQueryByIndex(mapObj* map) has a local variable resultObj record;. The field record.resultindex is never initialized. In this function the uninitialized record-variable is passed to msLayerGetShape(...,record). The Oracle-Implementation msOracleSpatialLayerGetShape of the msLayerGetShape-Function evaluates the uninitialized record.resultindex. In my case msOracleSpatialLayerGetShape threw an error. SOLUTION (Suggestion): In msQueryByIndex resultObj record should be initialized. At least: record.resultindex = -1; From a users point of view this error rises sporadic. Benedikt PS: I have some more frustrating issues of this kind. But this is the only one I can desribe precisly. thomas bonfort thomas.bonf...@gmail.com schrieb am 02.08.2012 09:16:52: thomas bonfort thomas.bonf...@gmail.com 02.08.2012 09:23 An umn...@hydrotec.de Kopie MapserverList OSGEO mapserver-users@lists.osgeo.org Thema Re: [mapserver-users] Mapserver 6: Oracle layerObj.queryByIndex Hi, Issues https://github.com/mapserver/mapserver/issues/4238 and https://github.com/mapserver/mapserver/issues/4076 seem closely related. I'm not a query expert, but I do know that part of the code has been quite heavily worked on for 6.2, any chance you could try with that version and confirm if it has been fixed or not? regards, thomas On Wed, Aug 1, 2012 at 4:51 PM, umn...@hydrotec.de wrote: Hi I'm porting an Java-Mapscript-application from Mapserver 5.4 to Mapserver 6.0. Data is stored in Oracle-Saptial. I have a problem with layerObj.queryByIndex. To illustrate, i use a small Java-Testprogram: import edu.umn.gis.mapscript.layerObj; import edu.umn.gis.mapscript.mapObj; import edu.umn.gis.mapscript.shapeObj; public class QueryExtent { public static void main(String argv []) { mapObj map = new mapObj(java_test\\umn.map); layerObj l = map.getLayerByName(Gemeinden); // Gemeinden is Oracle-Spatial-Layer int i = l.queryByIndex(map, 0, 2, 0); System.out.println(i); } } This program prints 1 - saying, that the queryByIndex-call was not successfull. Logfile: msOracleSpatialLayerGetShape(): OracleSpatial error. msOracleSpatialLayerGetShape record out of range By additional debugging I saw: In msOracleSpatialLayerGetShape Mapserver runs into the if (resultindex = 0)-branch. In my case resultindex is an extra-ordinary big integer-number. I don't really understand ths query-layer-code in Mapserver. But I think in my case resultindex should by -1 and that Mapserver should initialize resultindex automatically. Therfore I changed code: int msQueryByIndex(mapObj *map) { ... resultObj record; record.resultindex = -1; // added line. } Is the fix correct or should I use Mapscript differently? Benedikt ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver 6: Oracle layerObj.queryByIndex
Hi I'm porting an Java-Mapscript-application from Mapserver 5.4 to Mapserver 6.0. Data is stored in Oracle-Saptial. I have a problem with layerObj.queryByIndex. To illustrate, i use a small Java-Testprogram: import edu.umn.gis.mapscript.layerObj; import edu.umn.gis.mapscript.mapObj; import edu.umn.gis.mapscript.shapeObj; public class QueryExtent { public static void main(String argv []) { mapObj map = new mapObj(java_test\\umn.map); layerObj l = map.getLayerByName(Gemeinden); // Gemeinden is Oracle-Spatial-Layer int i = l.queryByIndex(map, 0, 2, 0); System.out.println(i); } } This program prints 1 - saying, that the queryByIndex-call was not successfull. Logfile: msOracleSpatialLayerGetShape(): OracleSpatial error. msOracleSpatialLayerGetShape record out of range By additional debugging I saw: In msOracleSpatialLayerGetShape Mapserver runs into the if (resultindex = 0)-branch. In my case resultindex is an extra-ordinary big integer-number. I don't really understand ths query-layer-code in Mapserver. But I think in my case resultindex should by -1 and that Mapserver should initialize resultindex automatically. Therfore I changed code: int msQueryByIndex(mapObj *map) { ... resultObj record; record.resultindex = -1; // added line. } Is the fix correct or should I use Mapscript differently? Benedikt ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Windows 2008; Java; 64 Bit
Hi Tamas I created trac.osgeo.org/mapserver/ticket/3491. In hope of advise I was bold enough to put your email-adress in cc :-) Best regards , Benedikt Tamas Szekeres szeker...@gmail.com schrieb am 13.07.2010 16:43:53: Tamas Szekeres szeker...@gmail.com 13.07.2010 16:52 An umn...@hydrotec.de Kopie mapserver-users@lists.osgeo.org Thema Re: [mapserver-users] Windows 2008; Java; 64 Bit Benedikt, It may be a bug in the mapscript Java bindings, feel free to create a ticket for this issue. Best regards, Tamas 2010/7/13 umn...@hydrotec.de I want to use Mapserver in TomCat6; Windows 2008; 64 Bit; Sun-Java 1.6..21 Mapserver compiled by Tamas Szekeres: release-1500-x64-gdal-1-7- mapserver-5-6.zip (vbkto.dyndns.org/sdk/Default.aspx ) Unfortunately the Java-VM crashes! To reduce the problem I tried example-programs in UMN\mapscript \java\examples\ - MakePoint runs without error. - QueryByAttribute results in the same crash as the big-tomcat- environment does. As far as I can see, the crash occurs every time, when a string- parameter ist provided to the Mapserver API. I think, that the VM-crash occurs, when the function JNU_GetStringNativeChars(jenv, jarg1) from mapscript_wrap.c is called. Surprinsingly the error occurs with other release-XXX-packages fromTamas too. It even occurs, when I use a 32-Bit-Environment an MS4w on this computer. I attach an hs_err_pid-.log-File. Does anybody has any advice? Greetings, Benedikt ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Re: msOracleSpatialLayerWhichShapes(): OracleSpatial error
Some staring on maporaclespatial.c: - There are two global static variables in maporaclestapital: static OCIType *ordinates_tdo = NULL; static OCIArray *ordinates; But as far as I understood mapserver-code should be threadsave. - In line 2011 ordinates is allocated with OCIObjectNew. There's now corresponding OCIObjectFree. Similar problem on allocation of ordinates_tdo? - Actually I don't think, that this solves my current problem... Benedikt Jim Klassen klassen...@gmail.com schrieb am 26.05.2010 16:38:00: Jim Klassen klassen...@gmail.com 26.05.2010 16:46 An umn...@hydrotec.de umn...@hydrotec.de Kopie mapserver-users@lists.osgeo.org mapserver-users@lists.osgeo.org Thema Re: [mapserver-users] Re: msOracleSpatialLayerWhichShapes(): OracleSpatial error One thing that I find particularly strange about these errors (ORA-0600) is that when you look them up they say internal error - call Oracle. So while MapServer is probably doing something strange, the database is still failing in an unexpected way. I would expect it to return something from the OCI library or a more specific db error like invalid handle or invalid statement or something similar. Jim K On May 26, 2010, at 6:22 AM, umn...@hydrotec.de wrote: Hi I'm facing similar/also strange problems. I use * mapserver 5.6.3, * Linux-Redhat (Version ?) * 64-Bit * Oracle 11g on the DB-client * Sun-Java 1.6 When creating some maps with a selection I get: java.lang.UnknownError: msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00600: Interner Fehlercode, Argumente: [kokeaai5], [18], [2], [], [], [], [], [], [], [], [], [] . Query statement: SELECT GEWAESSER_ID, NAME, GEWAESSER_ID, DARSTELLUNGSSTUFE, shape FROM (select WWI.GEWAESSER.NAME, WWI.GEWAESSER.SHAPE, WWI.GEWAESSER.GEWAESSER_ID,WWI.GEWAESSER.DARSTELLUNGSSTUFE FROM WWI.GEWAESSER) WHERE SDO_FILTER( shape, MDSYS.SDO_GEOMETRY(2003, :srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates ),'querytype=window') = 'TRUE' . Check your data statement. at edu.umn.gis.mapscript.mapscriptJNI.layerObj_queryByRect (Native Method) at edu.umn.gis.mapscript.layerObj.queryByRect(layerObj.java:513) at de.hydrotec.ims.umn.MapMetaInfoImpl.configureSelection (MapMetaInfoImpl.java:216) * Problem occurs in most cases after making three selections * Problem occurs on a 11g and a 10g databaseserver. * What's *really* strange: A record in the queried table GEWAESSER is corrupted! Even though the mapserver-user has no UPDATE-GRANTS. * No problems with mapserver 5.4.2. (This is my fallback for the current project...) Sorry for not being more specific. But it's not easy to describe this strange behaviour. Never found something like this. I saw, that maporaclespatial in the SVN-trunk has some important fixes. Question: * Can I use the most current maporaclespatial from the trunk? Will it be compatible with the rest of mapserver5.6.3? * Is there any hope, that this may help? Benedikt mapserver-users-boun...@lists.osgeo.org schrieb am 26.05.2010 00:00:48: Agostino acsvilu...@yahoo.it Gesendet von: mapserver-users-boun...@lists.osgeo.org 26.05.2010 00:01 An mapserver-users@lists.osgeo.org Kopie Thema [mapserver-users] Re: msOracleSpatialLayerWhichShapes(): OracleSpatial error Thank you Tamas. I think that the new 5.6 functions does not work properly with oracle spatial. Also with the last build from http://vbkto.dyndns.org/sdk/ i have error. The following code works: layerObj lo = map.getLayer(i); ... res = lo.queryByAttributes(map, null, strQuery.ToString(), mapscript.MS_MULTIPLE); ... resultCacheObj results = lo.getResults(); int numres = results.numresults; for (int j = 0; j numres; j++) { int shapeInd = results.getResult(j).shapeindex; shapeObj shp = lo.getFeature(shapeInd, -1); layerObj loSel = GetSelectionLayer(map, lo.type); shp.draw(map, loSel, img); } but if i write this using new functions: layerObj lo = map.getLayer(i); ... res = lo.queryByAttributes(map, null, strQuery.ToString(), mapscript.MS_MULTIPLE); ... int numres = lo.getNumResults(); for (int j = 0; j numres; j++) { resultCacheMemberObj reso = lo.getResult(j); shapeObj shp = new shapeObj((int)lo.type); lo.resultsGetShape(shp, reso.shapeindex, reso.tileindex); layerObj loSel = GetSelectionLayer(map, lo.type); shp.draw(map, loSel, img); } i have the exception msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00600: codice di errore interno, argomenti: [17182], [0x2581CE802], [], [], [], [], [], [] after call drawmap(). Agostino. -- View this message in context: http://osgeo-org.
[mapserver-users] Re: msOracleSpatialLayerWhichShapes(): OracleSpatial error
Hi I'm facing similar/also strange problems. I use * mapserver 5.6.3, * Linux-Redhat (Version ?) * 64-Bit * Oracle 11g on the DB-client * Sun-Java 1.6 When creating some maps with a selection I get: java.lang.UnknownError: msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00600: Interner Fehlercode, Argumente: [kokeaai5], [18], [2], [], [], [], [], [], [], [], [], [] . Query statement: SELECT GEWAESSER_ID, NAME, GEWAESSER_ID, DARSTELLUNGSSTUFE, shape FROM (select WWI.GEWAESSER.NAME, WWI.GEWAESSER.SHAPE, WWI.GEWAESSER.GEWAESSER_ID,WWI.GEWAESSER.DARSTELLUNGSSTUFE FROM WWI.GEWAESSER) WHERE SDO_FILTER( shape, MDSYS.SDO_GEOMETRY(2003, :srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates ),'querytype=window') = 'TRUE' . Check your data statement. at edu.umn.gis.mapscript.mapscriptJNI.layerObj_queryByRect(Native Method) at edu.umn.gis.mapscript.layerObj.queryByRect(layerObj.java:513) at de.hydrotec.ims.umn.MapMetaInfoImpl.configureSelection(MapMetaInfoImpl.java:216) * Problem occurs in most cases after making three selections * Problem occurs on a 11g and a 10g databaseserver. * What's *really* strange: A record in the queried table GEWAESSER is corrupted! Even though the mapserver-user has no UPDATE-GRANTS. * No problems with mapserver 5.4.2. (This is my fallback for the current project...) Sorry for not being more specific. But it's not easy to describe this strange behaviour. Never found something like this. I saw, that maporaclespatial in the SVN-trunk has some important fixes. Question: * Can I use the most current maporaclespatial from the trunk? Will it be compatible with the rest of mapserver5.6.3? * Is there any hope, that this may help? Benedikt mapserver-users-boun...@lists.osgeo.org schrieb am 26.05.2010 00:00:48: Agostino acsvilu...@yahoo.it Gesendet von: mapserver-users-boun...@lists.osgeo.org 26.05.2010 00:01 An mapserver-users@lists.osgeo.org Kopie Thema [mapserver-users] Re: msOracleSpatialLayerWhichShapes(): OracleSpatial error Thank you Tamas. I think that the new 5.6 functions does not work properly with oracle spatial. Also with the last build from http://vbkto.dyndns.org/sdk/ i have error. The following code works: layerObj lo = map.getLayer(i); ... res = lo.queryByAttributes(map, null, strQuery.ToString(), mapscript.MS_MULTIPLE); ... resultCacheObj results = lo.getResults(); int numres = results.numresults; for (int j = 0; j numres; j++) { int shapeInd = results.getResult(j).shapeindex; shapeObj shp = lo.getFeature(shapeInd, -1); layerObj loSel = GetSelectionLayer(map, lo.type); shp.draw(map, loSel, img); } but if i write this using new functions: layerObj lo = map.getLayer(i); ... res = lo.queryByAttributes(map, null, strQuery.ToString(), mapscript.MS_MULTIPLE); ... int numres = lo.getNumResults(); for (int j = 0; j numres; j++) { resultCacheMemberObj reso = lo.getResult(j); shapeObj shp = new shapeObj((int)lo.type); lo.resultsGetShape(shp, reso.shapeindex, reso.tileindex); layerObj loSel = GetSelectionLayer(map, lo.type); shp.draw(map, loSel, img); } i have the exception msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00600: codice di errore interno, argomenti: [17182], [0x2581CE802], [], [], [], [], [], [] after call drawmap(). Agostino. -- View this message in context: http://osgeo-org. 1803224.n2.nabble.com/msOracleSpatialLayerWhichShapes-OracleSpatial- error-tp5048929p5100718.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Strange code in maporaclespatial.c
Hi When I compiled mapserver 5.6.3 I got a warning, that a variable may be used without initialization. maporaclespatial.c; line 1322/1331: Code looks indeed a bit strange ... static void osPointCluster(msOracleSpatialHandler *hand, shapeObj *shape, SDOGeometryObj *obj, int start, int end, lineObj points, int interpretation, int data3d, int data4d) { int n; //n = (end - start)/2; //n = interpretation; // //if (n == interpretation) // { points.point = (pointObj *)malloc( sizeof(pointObj)*n ); n is used in malloc without any defined value ... Bye, Benedikt ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Antwort: [mapserver-users] OracleSpatial ENCODING
Hello! I would like to get Polish fonts from layer stored in Oracle Spatial. The layer is properly created and I can nicely GetMap(s). In the LABEL section in my mapfile I've added ENCODING ISO-8859-2 For german we have to set the environment-variable NLS_LANG: export NLS_LANG=german_germany.we8iso8859p1 Maybe you have to use NLS_LANG=poland_polish.we8iso8859p2 or just NLS_LANG=we8iso8859p2 Benedikt http://www.dba-oracle.com/t_nls_lang.htm It does not work. Help! -- View this message in context: http://n2.nabble.com/OracleSpatial- ENCODING-tp2268981p2268981.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Antwort: [mapserver-users] msOracleSpatialLayerGetShape(): OracleSpatial error. Error: ORA-00932
Hi I think you shouldn't query 2 geometry-columns at once Either DATA GEOMETRIA FROM (SELECT ID, GEOMETRIA FROM GEOM) USING UNIQUE ID SRID XYZ or DATA GEO_CENTROID FROM (SELECT ID, GEO_CENTROID FROM GEOM) USING UNIQUE ID SRID XYZ If you want to have the Centerpoint in Getfeatureinfo you may try: DATA GEOMETRIA FROM (SELECT ID, GEOMETRIA, GEO_CENTROID.SDO_POINT.X, GEO_CENTROID.SDO_POINT.Y FROM GEOM) USING UNIQUE ID SRID XYZ Bye Benedikt Rothe mapserver-users-boun...@lists.osgeo.org schrieb am 04.02.2009 14:58:02: Hi, I've created a simple Oracle table, which contains NUMERIC id, SDO_GEOMETRY shape and SDO_GEOM.SDO_CENTROID based on shape. There are spatial indexes on both geometry columns. GetMap requests are valid and I can see the map. However, when requesting a GetFeatureInfo I receive: Layer 'SHAPE' Content-type: application/vnd.ogc.se_xml ?xml version='1.0' encoding=ISO-8859-1 standalone=no ? !DOCTYPE ServiceExceptionReport SYSTEM http://schemas.opengis.net/wms/1.1.0/exception_1_1_0.dtd; ServiceExceptionReport version=1.1.0 ServiceException msOracleSpatialLayerGetShape(): OracleSpatial error. Error: ORA-00932: inconsistent datatypes: expected %s got %s . Query statement: SELECT ID, GEO_CENTROID, GEOMETRIA FROM GEOM WHERE ID = 18746 .Check your data statement. /ServiceException /ServiceExceptionReport below my WMS request: http://localhost/cgi-bin/mapserv?map=/map/shape. mapservice=WMSVERSION=1.1SRS=EPSG: 4326LAYERS=SHAPETRANSPARENT=trueFORMAT=image% 2FpngREQUEST=GetFeatureInfoSTYLES=EXCEPTIONS=application%2Fvnd. ogc.se_xmlBBOX=17.545968%2C51.146653%2C17.552216%2C51. 151939X=374Y=146INFO_FORMAT=mimeQUERY_LAYERS=SHAPEWIDTH=656HEIGHT=555 any help apriciated! -- View this message in context: http://n2.nabble. com/msOracleSpatialLayerGetShape%28%29%3A-OracleSpatial-error.- Error%3A-ORA-00932-tp2268870p2268870.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Antwort: msOracleSpatialLayerGetShape(): OracleSpatial error. Error: ORA-00932
Hi In the cases, you didn't find the solution on your own, you should post your mapfile. - any projection-issue? - correct layer type? - geometrie-objects validated (SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEX)? Benedikt mapserver-users-boun...@lists.osgeo.org schrieb am 04.02.2009 16:46:53: Hi, I've changed into: DATA GEOMETRIA FROM (SELECT ID, GEOMETRIA FROM GEOM) USING UNIQUE ID VERSION 10g and GetFeatureInfo works fine. However, I can not see the map :( -- View this message in context: http://n2.nabble. com/msOracleSpatialLayerGetShape%28%29%3A-OracleSpatial-error.- Error%3A-ORA-00932-tp2268870p2269508.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] OpenLayers and Mapscript C#
... CGI / WMS / KaMap and you should implement one of those interface specifications in your MapScript C# Maybe http://mapserver.org/ogc/mapscript.html is helpfull by implementing WMS with C#. Bye, Benedikt Rothe mapserver-users-boun...@lists.osgeo.org schrieb am 01.02.2009 16:46:11: Hi, This question is more about an OpenLayers than a mapserver issue. I suspect OpenLayers can rely on commonly used mapping interfaces like MapServer CGI / WMS / KaMap and you should implement one of those interface specifications in your MapScript C# application to be able to interact. Best regards, Tamas 2009/2/1 sandric ionut sandricio...@yahoo.com Hello: Is it possible to use Mapscript C# and OpenLayers? I want to create a website using Mapscript C# and use OpenLayers to handle the zoom and pan May I receive an example for a similar implementation? Thank you, Ionut ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer x Oracle 9i
Hi We used Mapserver with Oracle9 and Oracle10. I cannot remember any problems which emerged by the the Oracle-version. You should obey http://mapserver.org/input/vector/oracle.html?highlight=oracle#additional-keywords-version Bye Benedikt Rothe mapserver-users-boun...@lists.osgeo.org schrieb am 30.01.2009 12:34:33: Hi! I'm beginning with MapServer. Does MapServer support Oracle 9i? I visited MapServer website and I just have information about Oracle 10g. Can you pass me some link about it to help me? Thanks in advance! Verusa [Bild entfernt] Verusa Domethildes Analista de Sistemas Res: (27) 3039-4283 Cel: (27) 9242-9778 Temos que ser a transformação que queremos no mundo. Mahatma Gandhi Conheça já o Windows Live Spaces, o site de relacionamentos do Messenger! Crie já o seu!___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Dynamin SQL with mapserver CGI?
I think validation patterns are a real solution to the problem and minimizing access-priviliges is not. When filter with URL-substitution is used without validation patterns, one relies on the security-system of postgres. This is acceptable in most intranets but hazardous in the internet. Look for example at http://www.postgresql.org/support/security.html what can be done with even a minimal-postgres-login Ciao Benedikt Extract of the http://www.postgresql.org/support/security.html * Three vulnearbilities in the regular expression handling libraries can be exploited to cause a backend crash, infinite loops or memory exhaustion. This vulnearbility can be exploited through frontend applications that allow unfiltered regular expressions to be passed in queries. * A bug in the handling of SET ROLE allows escalation of privileges to any other database user, including superuser. A valid login is required to exploit this vulnerability * Calling COALESCE() with two NULL parameters would cause the current backend to crash, causing a denial of service. A valid login is required to exploit this vulnerability. * Public EXECUTE access is given to certain character conversion functions that are not designed to be safe against malicious arguments. This can cause at least a denial of service. A valid login is required to exploit this vulnerability Steve Lime steve.l...@dnr.state.mn.us schrieb am 26.01.2009 21:29:52: In addition, one can and should apply validation patterns to variables used in SQL. That way MapServer can test the input data before handing off to PostGIS or whatever. These patterns are set in LAYER metadata. For example: LAYER ... DATA'the_geom FROM (SELECT the_geom FROM my_table WHERE ID = '%id%') as foo USING UNIQUE OID METADATA id_validation_pattern '^[0-9]{3}$' END END This tells the CGI to test the request parameter against the regex '^[1-9]{3}$'. The regex says that the value of the id variable must be an number exactly 3 digits long with no zeros. Any attempt to send a value other than that will generate an error message. The CGI code does not force the use of validation. Validation like this will be further expanded in 5.4 with the addition of a new validation object. So you'd see something like: LAYER ... VALIDATION 'id' '^[0-9]{3}$ END END Steve On 1/26/2009 at 8:47 AM, in message 6246727221874a4fb8d3f9bbc37d9bd5056da...@s-sp22.pca.state.mn.us, Fawcett, David david.fawc...@state.mn.us wrote: Of course, part of security is also having your application hit your database as a user that only has the rights that it needs. If your user only has select rights on only the data that you want to expose, that should help limit some of these issues. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of umn...@hydrotec.de Sent: Monday, January 26, 2009 4:43 AM To: MapServer Subject: Re: [mapserver-users] Dynamin SQL with mapserver CGI? Not any great hazard, I believe, ... Mmh. I'd be cautious. Example: * Mapfile: DATA the_geom from buildings * Set Filter via URL to this: 1=1);DELETE FROM OTHERTABLE; DECLARE X BINARY CURSOR FOR SELECT * from buildings WHERE (1=1 I think Mapserver will create the following statements: (I've added newlines) DECLARE mycursor BINARY CURSOR FOR SELECT the_geom from buildings WHERE (1=1); DELETE FROM OTHERTABLE; DECLARE X BINARY CURSOR FOR SELECT * from buildings WHERE (1=1) and (%s setSRID( ...) ) Mapserver calls PQExec with these statements. PQExec will execute every statement and will return the results of the last one. Bye Benedikt Rothe Rahkonen Jukka jukka.rahko...@mmmtike.fi schrieb am 26.01.2009 09:34:31: Hi, Not any great hazard, I believe, if it means that user can normally get all the features, but only a subset when filter is set. It is different case if DATA clause is manipulated, and therefore that must be connected to DATAPATTERN. -Jukka Rahkonen- Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] Puolesta umn...@hydrotec.de Lähetetty: 26. tammikuuta 2009 10:03 Vastaanottaja: MapServer Aihe: Re: [mapserver-users] Dynamin SQL with mapserver CGI? Hi You can use a replaceable parameter in the FILTER clause if all you ... This introduces the hazard of SQL-Injection, doesn't it? Bye Benedikt Rothe mapserver-users-boun...@lists.osgeo.org schrieb am 24.01.2009 14:04:42: On Sat, Jan 24, 2009 at 3:18 AM, Saka Royban srph...@yahoo.com wrote: Hi all
RE: [mapserver-users] Dynamin SQL with mapserver CGI?
I think validation patterns are a real solution to the problem and minimizing access-priviliges is not. When filter with URL-substitution is used without validation patterns, one relies to heavily on the security-system of postgres. This is acceptable in most intranets but hazardous in the internet. Look for example at http://www.postgresql.org/support/security.html to see, what can be done with even a minimal-postgres-login. But again: Everything's fine with validation patterns ... Ciao Benedikt Extract of the http://www.postgresql.org/support/security.html * Three vulnearbilities in the regular expression handling libraries can be exploited to cause a backend crash, infinite loops or memory exhaustion. This vulnearbility can be exploited through frontend applications that allow unfiltered regular expressions to be passed in queries. * A bug in the handling of SET ROLE allows escalation of privileges to any other database user, including superuser. A valid login is required to exploit this vulnerability * Calling COALESCE() with two NULL parameters would cause the current backend to crash, causing a denial of service. A valid login is required to exploit this vulnerability. * Public EXECUTE access is given to certain character conversion functions that are not designed to be safe against malicious arguments. This can cause at least a denial of service. A valid login is required to exploit this vulnerability Steve Lime steve.l...@dnr.state.mn.us schrieb am 26.01.2009 21:29:52: In addition, one can and should apply validation patterns to variables used in SQL. That way MapServer can test the input data before handing off to PostGIS or whatever. These patterns are set in LAYER metadata. For example: LAYER ... DATA'the_geom FROM (SELECT the_geom FROM my_table WHERE ID = '%id%') as foo USING UNIQUE OID METADATA id_validation_pattern '^[0-9]{3}$' END END This tells the CGI to test the request parameter against the regex '^[1-9]{3}$'. The regex says that the value of the id variable must be an number exactly 3 digits long with no zeros. Any attempt to send a value other than that will generate an error message. The CGI code does not force the use of validation. Validation like this will be further expanded in 5.4 with the addition of a new validation object. So you'd see something like: LAYER ... VALIDATION 'id' '^[0-9]{3}$ END END Steve On 1/26/2009 at 8:47 AM, in message 6246727221874a4fb8d3f9bbc37d9bd5056da...@s-sp22.pca.state.mn.us, Fawcett, David david.fawc...@state.mn.us wrote: Of course, part of security is also having your application hit your database as a user that only has the rights that it needs. If your user only has select rights on only the data that you want to expose, that should help limit some of these issues. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of umn...@hydrotec.de Sent: Monday, January 26, 2009 4:43 AM To: MapServer Subject: Re: [mapserver-users] Dynamin SQL with mapserver CGI? Not any great hazard, I believe, ... Mmh. I'd be cautious. Example: * Mapfile: DATA the_geom from buildings * Set Filter via URL to this: 1=1);DELETE FROM OTHERTABLE; DECLARE X BINARY CURSOR FOR SELECT * from buildings WHERE (1=1 I think Mapserver will create the following statements: (I've added newlines) DECLARE mycursor BINARY CURSOR FOR SELECT the_geom from buildings WHERE (1=1); DELETE FROM OTHERTABLE; DECLARE X BINARY CURSOR FOR SELECT * from buildings WHERE (1=1) and (%s setSRID( ...) ) Mapserver calls PQExec with these statements. PQExec will execute every statement and will return the results of the last one. Bye Benedikt Rothe Rahkonen Jukka jukka.rahko...@mmmtike.fi schrieb am 26.01.2009 09:34:31: Hi, Not any great hazard, I believe, if it means that user can normally get all the features, but only a subset when filter is set. It is different case if DATA clause is manipulated, and therefore that must be connected to DATAPATTERN. -Jukka Rahkonen- Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto: mapserver-users-boun...@lists.osgeo.org] Puolesta umn...@hydrotec.de Lähetetty: 26. tammikuuta 2009 10:03 Vastaanottaja: MapServer Aihe: Re: [mapserver-users] Dynamin SQL with mapserver CGI? Hi You can use a replaceable parameter in the FILTER clause if all you ... This introduces the hazard of SQL-Injection, doesn't it? Bye Benedikt Rothe mapserver-users-boun...@lists.osgeo.org schrieb am 24.01.2009 14:04:42: On Sat, Jan
Re: [mapserver-users] Dynamin SQL with mapserver CGI?
Hi You can use a replaceable parameter in the FILTER clause if all you ... This introduces the hazard of SQL-Injection, doesn't it? Bye Benedikt Rothe mapserver-users-boun...@lists.osgeo.org schrieb am 24.01.2009 14:04:42: On Sat, Jan 24, 2009 at 3:18 AM, Saka Royban srph...@yahoo.com wrote: Hi all I'm looking for a way to change SQL dynamically via URL parameters. it sounds from doc that changing DATA element in map file is impossible. Is there any other way? You can use a replaceable parameter in the FILTER clause if all you want to do is alter the WHERE clause. So for example: FILTER %criteria% and criteria=id='value' would work with a database like Postgres. When working with a database you put the whole SQL WHERE clause in the FILTER, whereas with shapefiles or ORG data sources you use the FILTERITEM and FILTER. -- Richard Greenwood richard.greenw...@gmail.com www.greenwoodmap.com ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Antwort: Re: [mapserver-users] Strange line in picture
Once again on this. I wrote, that the problem would be solved in 5.0.2. That's wrong. In my tests I mixed up GD/AGG. With GD2.0.35/MS 5.0.2 bug is still there and is still reproducible with the testcase. Sorry for confusion Benedikt Rothe [EMAIL PROTECTED] schrieb am 24.02.2008 19:04:56: I repeated the test with 5.0.2. Error doesn't occure. Seems to be solved. Bye Benedikt Rothe Gregor Mosheh [EMAIL PROTECTED] schrieb am 24.02.2008 18:23:10: [EMAIL PROTECTED] wrote: In some cases Mapserver produces an unwanted and strange horizontal line at the bottom of a map, if a point is rendered near the bottom. If the answer is the same as when I noted this some months ago: That's a known GD+Mapserver bug. But strangely I didn't find this bug in the MS Trac; not that I looked very hard. Try AGG, or grab the latest Subversion version of Mapserver. Then again, the fix may be in 5.0.1 by now. -- Gregor Mosheh / Greg Allensworth, BS, A+ System Administrator HostGIS cartographic development hosting services http://www.HostGIS.com/ Remember that no one cares if you can back up, only if you can restore. - AMANDA___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users