[Mapserver-users] Addtional info/questions about "Another question about DGN attribute query"
Emil Zegers
EZS at DeStraat.NL
Wed Jan 28 07:10:06 PST 2004
Hello Frank,
I've tested the DGN file with ogrinfo as you advised, I've included parts of the outcome in this message.
To me it seems that it is not possible to query the MSLink attribute in a DGN file with Mapserver 4.0 (win binary), can you tell me if I am correct on this?
Also, I had doubts on what attribute name was the right one to query exactly.
If I look at the DGN file in Arcexplorer the link attributes are called 'MsLinkOracle' and 'MsLinkOracle 1'.
When using ogrinfo it is called 'MSLink''.
I then found I could use the 'MSLink' values as Lableitem in Mapserver so I can show the MSLink values on a map image.
But my ultimate goal is to be able to query them so I can get the underlying attribute data from the database (of course I could put all spatial and attribute data together in one database but I would like to have the DGN item query working for situations where it is not possible to do so).
ogrinfo outcome for GROENNAALDWIJK.DGN
1.
ogrinfo -ro -al GROENNAALDWIJK.DGN -where 'Text is not null' | more
INFO: Open of `GROENNAALDWIJK.DGN'
using driver `DGN' successful.
Isn't it strange that I don't get any records here? Because there are elements where text is not null (see 2.). Could this have something to do with the unkown geometry (see3.) And if so, can this be solved or worked around?
2.
ogrinfo -ro -al GROENNAALDWIJK.DGN | more
(included the outcome for two elements only as an example)
OGRFeature(elements):207
Type (Integer) = 17
Level (Integer) = 43
GraphicGroup (Integer) = 0
ColorIndex (Integer) = 0
Weight (Integer) = 0
Style (Integer) = 0
EntityNum (Integer) = 1001
MSLink (Integer) = 100028
Text (String) = BOD
Style = LABEL(t:"BOD",c:#ffffff,s:1.000g)
LINESTRING (73115.085 44510.886)
OGRFeature(elements):1657
Type (Integer) = 3
Level (Integer) = 61
GraphicGroup (Integer) = 0
ColorIndex (Integer) = 11
Weight (Integer) = 0
Style (Integer) = 0
EntityNum (Integer) = 1001
MSLink (Integer) = 100027
Text (String) = (null)
Style = PEN(id:"ogr-pen-0",c:#a0e000)
LINESTRING (73255.050 445695.718,73255.056 445695.713)
3.
ogrinfo -ro -al GROENNAALDWIJK.DGN -summary
INFO: Open of `GROENNAALDWIJK.DGN'
using driver `DGN' successful.
Layer name: elements
Geometry: Unknown (any)
Feature Count: 25538
Extent: (72794.312000, 443434.460000) - (75347.808000, 447314.550000)
Layer SRS WKT:
(unknown)
Type: Integer (2.0)
Level: Integer (2.0)
GraphicGroup: Integer (4.0)
ColorIndex: Integer (3.0)
Weight: Integer (2.0)
Style: Integer (1.0)
EntityNum: Integer (8.0)
MSLink: Integer (10.0)
Text: String (0.0)
So I can use Text and MSLink as label items (have not yet tested any others) for every layertype but whatever layertype I choose I can never query them.
I hope this info is helpful and maybe you or anybody else can provide some more info on DGN item query with Mapserver.
A thought that just popped in my mind; is DGN item query possible in Mapserver through the FME Gateway?
Best regards,
Emil Zegers
>>> Frank Warmerdam <warmerdam at pobox.com> 01/26/04 07:39pm >>>
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
______________________________________________________
This message has been checked for all known viruses
______________________________________________________
More information about the MapServer-users
mailing list