-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The angle follow with offset trigger an error when the box clip create a multiline #4733
Comments
|
Sorry, but I don't know how to add a zip file to an issue. |
|
I create an url from where the package is downloadable. Regards, Andrea. |
|
@aperi2007 please provide an extent which triggers your problem, using |
|
Hi, this is a call with extent on the same dataset and mapfile that fail for me. The extent is: The work extent is this: Thx, Andrea. |
|
@sdlime @dmorissette I need your help here. which is a GEOS error message wrapped in an OGR error code. any insight as to why this is happening would be appreciated! |
|
Hum, I suspect that the GEOS error handlers installed by MapServer in https://github.com/mapserver/mapserver/blob/rel-6-4-0-beta1/mapgeos.c#L58 are overridden by the GEOS error handlers installed by OGR in https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrgeometry.cpp#L1935 . Which explains why the GEOS error triggered by https://github.com/mapserver/mapserver/blob/rel-6-4-0-beta1/mapgeos.c#L699 ends up being reported as a OGR error ... Quick workaround : issue CPLErrorReset() just before https://github.com/mapserver/mapserver/blob/rel-6-4-0-beta1/mapogr.cpp#L1562 , so that previous CPL errors don't contaminate further... More cleaner approach : use the session oriented API or GEOS to install the error handlers : http://trac.osgeo.org/geos/browser/trunk/capi/geos_c.h.in#L169 and use all the _r suffixed functions instead of the global ones. It seems that the _r functions have been introduced in GEOS 3.1.0 ( http://trac.osgeo.org/geos/ticket/210 confirmed by their presence in http://trac.osgeo.org/geos/browser/tags/3.1.0/capi/geos_c.h.in ). This is probably old enough (4 years) so that MapServer can assume GEOS being 3.1.0 or later (if not already the case) |
|
Thanks Even, I hadn't thought of the fact that OGR was also using geos and would therefore have installed its own error handlers, that makes alot of sense. I'll have a look into this next week. |
|
FYI, I've just migrated GDAL trunk to use the _r GEOS API : http://trac.osgeo.org/gdal/changeset/26326 . Announced in http://lists.osgeo.org/pipermail/gdal-dev/2013-August/036877.html |
|
closing this one, will be fixed with #4738 |
|
@aperi2007 I hope I've fixed the GEOS/OGR collisions in #4738. Can you retest with the current master and close this issue if your original problem was fixed. thanks. |
|
Hi Thomas. I confirm i work without any error. Many thx for fixing. |
|
I see again this error on a my map using the mapserver from trunk. :( I have this couple of settings: with they I have an immediatly crash of mapserver. the crash happen also if I put If I remove the I try to do an use case test. |
|
At now I found only that the error came from the Geos lib: [Wed Oct 23 17:09:38 2013].557677 msGEOSError(): GEOS library error. � I'm using the geos 3.4.2 64bit. |
|
I'd need to get a backtrace of when that error is happening, you can get that by setting a breakpoint in msGEOSError() |
|
Sorry, but I'm no skill on cmake. There is an option in cmake to enable debug ? |
|
|
|
Sorry again, Is this the right procedure for a mapserver executables ? |
|
ok, I found how to activate the debug, After compile with debug option the start is:
So I can test the issue. Infact the same parameter combination on mapserver wms will produce a good visible map is a remove the Instead using the shp2img also with the OFFSET removed the image produced is always white. ... :/ |
|
clearing the milestone until we get more info or a testcase |
…>= 3.1.0 Currently QGIS uses the 'classic' GEOS API that uses a global context. This can conflict with libraries that would also use the global context and potentially finalize it whereas QGIS will still use it later. See https://groups.google.com/forum/#!topic/spatialite-users/9YSU6c5AVQ4 for such an example of such a recent issue with Spatialite. The _r API is available since GEOS 3.1.0, which is already an ancient GEOS version. For example, old-old-stable Ubuntu (Lucid 10.04) and Debian (squeeze) ship with GEOS 3.1.0 or later. Such move has also been done in GDAL 1.11 (http://lists.osgeo.org/pipermail/gdal-dev/2013-August/036877.html) and MapServer 7.0 (MapServer/MapServer#4733) There's no easy way unfortunately to check at compile time that you don't use the non _r API. I have patched my geos_c.h header to #ifdef that API (quite painfull to do..). A postprocessing check can be done however with : objdump -T output/lib/*.so | grep -v Base | grep GEOS | grep -v _r | grep -v "_ZN" | grep -v GEOSversion It should return nothing.
…OS to avoid issues with the global GEOS error handlers (see MapServer/MapServer#4733) and also save a mutex call in exportToGEOS()
|
Seems to be a long story. @aperi2007 , could you update the ticket with the current status with Mapserver 7.0? |
Using a Mapserver trunk, with gdal 1.10 and geos 3.3.8:
I notice that on a Line dataset, when the box of the map will clip a linestring creating a virtual multilinestring geometry the map is not create.
After some test the reuslt is that will happen when there is a Label with settings:
Angle Follow and offset.
And this happen with the data repository accessed using a gdal/ogr driver.
This happen with shapefile accessed using ogr driver and also with spatialite with ogr driver.
It don't happend using a shapefile accessed with mapserver native driver or using a inline dataset (also if of kind multilinestring).
I prepare a simple package with a test mapfile and a little spatialite db.
The test mapfile has a inline multilinestring that is always working.
Instead the spatialite accessed using ogr driver, when the line in it is clipped in the screen portion (creating a virtual multilinestring) the map is not create.
The text was updated successfully, but these errors were encountered: