[Mapserver-users] Another question about DGN attribute query
Frank Warmerdam
warmerdam at pobox.com
Mon Jan 26 10:39:21 PST 2004
Emil Zegers wrote:
> Hello list,
>
> At the moment I'm struggling with querying DGN attribute data which is not working out.
>
> I've found messages about this subject posted on the list before and they helped me to come where I am now: I can display the DGN with/without using the STYLEITEM "AUTO" and I can show the values from the Text field.
>
> But I cannot query any of the fields in the DGN, no matter what field (Text, level, Layer) for a certain LAYER TYPE (ANNOTATION, POINT, LINE, POLYGON) I query.
>
> This is the LAYER definition:
>
> # GROENNAALDWIJK_dgn
> LAYER
> METADATA
> wms_title "GROENNAALDWIJK_dgn"
> END
> NAME "GROENNAALDWIJK_dgn"
> TYPE POINT
> DEBUG ON
> CONNECTIONTYPE OGR
> CONNECTION "D:/websites/DemoData/Naaldwijk/Data/Basis/dgn/GROENNAALDWIJK.DGN"
> DATA "0"
> STATUS ON
> TOLERANCE 10
>
> STYLEITEM "AUTO"
>
> CLASSITEM "Text"
> CLASS
> END
>
> TEMPLATE "xmlqueries/dgn_xml.html"
> END
>
>
> This is the dgn_xml.html template defintion:
>
> <dgn>
> <Text>[Text]</Text>
> </dgn>
>
> It all ends in the following message:
>
> msOGRLayerGetShape(): OGR error. Requested feature is incompatible with layer type
>
> Now I'm looking for working examples of DGN attribute querying, has anyone been able to do so?
>
> And if yes, are you willing to share your knowledge and/or example MAP and TEMPLATE files?
Emil,
The message you are getting from MapServer normally means you were using a
polygon with a point layer or something like that. In particular, the
geometry type is NULL after attempted translation according to the layer type.
I would suggest you try and diagnose issues at the ogrinfo level.
For instance the following query should report on all features in your dgn file
that have some sort of text value.
ogrinfo -ro -al your.dgn -where 'Text is not null' | more
I would *guess* that some of your features appear odd to MapServer
because of the way they are being translated by OGR.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list