Opened 21 years ago

Closed 20 years ago

Last modified 20 years ago

#448 closed defect (fixed)

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 (1)

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

Download all attachments as: .zip

Change History (10)

by tylermitchell@…, 21 years ago

Attachment: sp858.zip added

Example DGN file that reproduces this bug

comment:1 by tylermitchell@…, 21 years ago

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. 

comment:2 by dmorissette, 21 years ago

Cc: morissette@… added

comment:3 by dmorissette, 21 years ago

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

comment:4 by dmorissette, 21 years ago

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?

comment:5 by tylermitchell@…, 21 years ago

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

comment:6 by fwarmerdam, 21 years ago

Status: newassigned
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.




comment:7 by fwarmerdam, 20 years ago

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. 

comment:8 by fwarmerdam, 20 years ago

Resolution: fixed
Status: assignedclosed
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. 

comment:9 by dmorissette, 20 years ago

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.