Ticket #448 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

OGRGeometry type MULTILINESTRING not supported

Reported by: tylermitchell@… Owned by: warmerdam
Priority: high Milestone:
Component: OGR Support Version: 4.1
Severity: major Keywords:
Cc:

Description

This is a MapServer/OGRLink issue.  If you file a bug for it in MapServer
bugzilla and assign it to me, I will try to fix it up.  I don't think mapserver
has a concept of multilinestrings, so I am not exactly sure what I will do with
it.

> I'm working in Mapserver with a DGN file (and trying to remember the
> lessons I learned last time :).
> I'm getting this error, which appears related to ogr:
> 
> msDrawMap(): Image handling error. Failed to draw layer named 'dgntest'.
> ogrGeomLine(): OGR error. OGRGeometry type `MULTILINESTRING' not supported.
> 
> Are you familiar with this problem or is it a problem at my end or is it a
> bug.  I've attached the renegade dgn file.
> Here is my  layer def'n in mapserver.  Any ideas?

Attachments

sp858.zip Download (48.7 KB) - added by tylermitchell@… 10 years ago.
Example DGN file that reproduces this bug

Change History

Changed 10 years ago by tylermitchell@…

Example DGN file that reproduces this bug

Changed 10 years ago by tylermitchell@…

Sometimes when viewing DNG files I get the multilinestring error and then some 
additional stuff as below:
msDrawMap(): Image handling error. Failed to draw layer named 'dgntest'. 
ogrGeomLine(): OGR error. OGRGeometry type `MULTILINESTRING' not supported. 
msAddImageSymbol(): Unable to access file. Error opening image file /apache 
group/apache2/htdocs/mapserver/mini/default-circle. 
msAddImageSymbol(): Unable to access file. Error opening image file /apache 
group/apache2/htdocs/mapserver/mini/ogr-pen-0. 
msAddImageSymbol(): Unable to access file. Error opening image file /apache 
group/apache2/htdocs/mapserver/mini/default-circle. 

Changed 10 years ago by dmorissette

  • cc morissette@… added

Changed 10 years ago by dmorissette

The mapogr.cpp code in MapServer is able to handle multilinestrings.  A
multilinestring is converted to a single shapeObj with multiple lineObjs in it.

This error message comes from OGR itself and is only forwarded to the user by
MapServer

Changed 10 years ago by dmorissette

BTW, we've got the same error a few days ago reading a GML file with
multilinestrings in it... could it be related?  Something that got broken in OGR
recently?

Changed 10 years ago by tylermitchell@…

FYI
The gdal.dll and mapserver schtuff I'm using is from:
http://www2.dmsolutions.ca/mapserver/dl/mapserver-4.1-dev-win32-php4.3.2.zip

Changed 10 years ago by fwarmerdam

  • status changed from new to assigned
Daniel, 

I am looking at the ogrGeomPoints() function in mapogr.cpp, and it does not
seem to have support for multilinestring.  It would also appear to be the
source of the "OGRGeometry type `MULTILINESTRING' not supported." message.  I
don't see any sign of an error from a lower level of OGR. 

I also see that ogrGeomLine() supports wkbMultiLineString, but *not* 
wkbMultiLineString25D.  Perhaps that is the real source of this problem?  

...

OK, I have updated ogrGeomPoint() and ogrGeomLine() to use wkbFlatten() to 
more easiliy check for 2D and 2.5D forms of geometries.   I suspect this
will correct the problem Tyler is seeing, assuming it was with a LINE layer,
not a POINT layer. 

However, I see ogrGeomPoints() still does not support any of the collection
geometry types.   I would suggest a new case be added in it to recurse on the
component objects of a collection.  I have not done that yet though.

Tyler, could you test with the latest CVS code now? 

PS.  This is likely arising now for DGN files because it was only fairly 
recently that I modified dgnlib to support multi-lines properly.  Likewise, 
GML multi-line-strings weren't even supported till a few weeks ago.




Changed 10 years ago by fwarmerdam

I have tested and fixed a small problem with (2.5D) multipoint collections
as point layers.  The test in the test suite is misc/multipoint.map. 

Changed 10 years ago by fwarmerdam

  • status changed from assigned to closed
  • resolution set to fixed
OK, as far as I know the only outstanding issue is that multilinestring,
multipolygon and geometrycollection geometry types are not supported by the
point layer drawing case.  I don't see this as too pressing an issue so I am
closing this report now. 

Changed 10 years ago by dmorissette

Sorry for not replying to your previous comments.  I always thought that
ogrGeomLine() was used for all layer types and didn't understand when you had
written when the case of multi* geometries were not handled for point layers.  
I have filed bug 478 to check that and possibly merge both cases into a single
function.
Note: See TracTickets for help on using tickets.