[mapserver-users] PHP, OGR, DGN help...

Tyler Mitchell TMitchell at lignum.com
Thu Apr 18 14:03:13 EDT 2002


Hi Chip, one thing to keep in mind is that STYLEITEM "AUTO" may not always
give you the results you were anticipating (if you are using this feature).
It was kind of funny because this automatic styling was working great - but
I thought I kept getting a blank screen.  Indeed, this was a "user-related
issue" :)  What was happening was that MapServer was rendering the linework
properly but it was colouring it white - which was the same colour as my
map background...you guessed it...my map looked blank.  Once I went into
the map file and change the IMAGECOLOR setting to something other than
white - oddly enough the map started to appear :)  So, you may want to try
the same to make sure that it's not something that simple.  Also, does it
appear that MapServer is taking time to render the DGN data?  I mean, does
it take any longer to draw your map with or without the DGN layer loading?
If there is no "time" difference, I would assume it's not loading at all.
But even if the background is the same colour as the features, it probably
would still take a tad bit longer to render your map.

Enjoy.
Tyler


                                                                                                                                                  
                      "Hankley, Chip"                                                                                                             
                      <Chip.Hankley at GASAI.Com>            To:       "MapServer List (E-mail)" <mapserver-users at lists.gis.umn.edu>                 
                      Sent by:                            cc:                                                                                     
                      owner-mapserver-users at lists.        Fax to:                                                                                 
                      gis.umn.edu                         Subject:  [mapserver-users] PHP, OGR, DGN help...                                       
                                                                                                                                                  
                                                                                                                                                  
                      04/18/2002 07:26 AM                                                                                                         
                                                                                                                                                  
                                                                                                                                                  




I need help integrating a DGN file in a MapServer app using PHP MapScript.

Configuration:

  Win2K, IIS
  PHP 4.06
  php_mapscript_35.dll (1/11/2002) from DMSolutions site (this is in the
    PHP4.06_ms5_final distribution folder)

Problem:

The DGN doesn't render...

No errors are returned, I just get a blank map window. The OGR part seems
to
be working b/c if I change the source to shapefile, I can get a shapefile
to
render (I converted the DGN to a shapefile in ArcView, and put it in the
same directory, if I toggle the CONNECTION lines in the mapfile below, the
shapefile works, the DGN doesn't).

As an aside, I can't seem to get the OGRINFO command to work... I
downloaded
the GDAL binary for WINNT (http://www.remotesensing.org/gdal/). This is
somewhat confusing b/c the gdal documentation focuses on raster data. Is
there an OGRINFO utility that is different than the OGRINFO that is in the
GDAL distribution?

TIA

Chip Hankley

MAPFILE -

# --------------------------------------------------------------
# Start of map file
# --------------------------------------------------------------
SIZE 400 400
EXTENT 263269 169782 285819 210757
UNITS FEET
SHAPEPATH "C:\Inetpub\wwwroot\OGR"
IMAGECOLOR 204 204 255
# --------------------------------------------------------------
# Start of web interface definition
# --------------------------------------------------------------
WEB
  IMAGEPATH "C:\Inetpub\wwwroot\tmp\"
  IMAGEURL "/tmp/"
END

# --------------------------------------------------------------
# Start of layer definitions
# --------------------------------------------------------------
LAYER
  NAME CAD1
  TYPE LINE
  STATUS ON
  Connectiontype OGR
  CONNECTION "C:\Inetpub\wwwroot\OGR\junk.dgn"
  #CONNECTION "C:\Inetpub\wwwroot\OGR\test_cad.shp"
  CLASS
    COLOR 0 255 0
  END
END # CAD1
END # End of MapFile








More information about the mapserver-users mailing list