[ms4w-users] OGR and DGN: doesn't work

Berényi Attila aberenyi at burken.hu
Fri Oct 26 10:19:50 EDT 2007


Thank you both for the fast response.
The key was the version of the dgn files. With v7 files it looks like 
the mapserver works correct, although the whole map area is white and i 
don't see my map in the map area...maybe it's because of the false 
configuration of the .map file?
Here it is:
#
# Start of map file
#
# Sample map file for a chameleon app.
#
NAME DEMO
STATUS ON
SIZE 800 600
SYMBOLSET ../etc/symbols.sym
EXTENT -100 -100 100 100
UNITS METERS
SHAPEPATH "../data"
IMAGECOLOR 255 255 255
FONTSET ../etc/fonts.txt
TRANSPARENT FALSE

#
# Start of web interface definition
#
WEB
  #MINSCALE 2000000
  #MAXSCALE 50000000
#
# On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the root
# of the drive where the .MAP file resides.
#
  IMAGEPATH "/ms4w/tmp/ms_tmp/"
  IMAGEURL "/ms_tmp/"
#  LOG "/tmp/gmap.log"
  METADATA
  END
END

#
# Start of reference map
#
REFERENCE
   IMAGE images/keymap.gif
   EXTENT -100 -100 100 100
   STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
  SIZE 120 90     
END

#
# Start of legend
#
LEGEND
  KEYSIZE 18 12
  LABEL
    TYPE BITMAP
    SIZE MEDIUM
    COLOR 0 0 89
  END
  STATUS ON
END

#
# Start of scalebar
#
SCALEBAR
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 0 0 0
    SIZE SMALL
  END
  SIZE 150 5
  COLOR 255 255 255
  BACKGROUNDCOLOR 0 0 0
  OUTLINECOLOR 0 0 0
  UNITS kilometers
  INTERVALS 5
  STATUS ON
END


QUERYMAP
  STYLE HILITE
  COLOR 255 0 0
END

PROJECTION
    "init=epsg:42304"
END

#
# Start of layer definitions
#


LAYER
  NAME dgn
  TYPE LINE
  STATUS DEFAULT
  CONNECTIONTYPE OGR
  CONNECTION "kicsi_v7.dgn"
  STYLEITEM "AUTO"
  CLASS
    NAME "teszt"
    SYMBOL 3 
    COLOR 0 0 255
  END
END # Layer

END # Map File

Any suggestion?

Thanks in advance,

Attila

Frank Warmerdam wote:
> Jeff McKenna wrote:
>> You can verify that your ms4w suppports DNG data by executing the 
>> following at the commandline:
>> - execute: /ms4w/setenv.bat
>> - execute: ogrinfo --formats
>> - look for a '"DGN" (read/write)' line
>> - now try a shp2img command with your mapfile (see 
>> http://mapserver.gis.umn.edu/docs/reference/utilityreference/shp2img)
>> - make sure your dng layer is in the same projection as your other data
>>    - possibly remove all other layers. projection objects, and set 
>> the map's EXTENT to that DNG layer, and then retry shp2img
>>
>> Mapfile example: 
>> http://mapserver.gis.umn.edu/docs/reference/vector_data/dgn
>>
>> Here's more reading on how OGR support DGN files: 
>> http://www.gdal.org/ogr/drv_dgn.html
>
> Attila,
>
> The only thing I would add to the above is that while DGN support is 
> standard
> in OGR, it only supports pre version 8 DGN files, not the modern 
> microstation
> v8 files.  Currently there is no way to directly read v8 files in 
> MapServer
> or via OGR.
>
> Best regards,


More information about the ms4w-users mailing list