[Mapserver-users] [gis newbie] Using my own data.

Nico Alberti n8 at langhirano.it
Tue Apr 20 06:44:17 PDT 2004


Jan Hartmann disse:

> Hi Nico, could you please send your mapfile and the ogrinfo results to
> the list? It is probably a small matter, as you seem to have prepared
> everything OK.
>

Thanks Jan and Robert for trying to help me.

That is the ogrinfo output of my shp file:

-------------------------------------------------------------
C:\Documents and Settings\AlbertiNico\Documenti\Bonifica
PMS\Lavori\GIS\openev_fw\bin>ogrinfo -al
c:\Inetpub\wwwroot\tutorial\autbacpo\principali-parmigiana.shp
|more

INFO: Open of
`c:\Inetpub\wwwroot\tutorial\autbacpo\principali-parmigiana.shp'
using driver `ESRI Shapefile' successful.

Layer name: principali-parmigiana
Geometry: Line String
Feature Count: 29
Extent: (596060.125000, 894392.000000) - (658805.250000, 980522.500000)
Layer SRS WKT:
[...and so on...]

-------------------------------------------------------------

So, I stripped down the tutorial's example1-1.map this way:

-------------------------------------------------------------
MAP
  IMAGETYPE      PNG
  EXTENT         596060.125000 894392.000000 658805.250000 980522.500000
  #EXTENT         201621.496941 -294488.285333 1425518.020722 498254.511514
  SIZE           400 300
  SHAPEPATH      "autbacpo"
  IMAGECOLOR     255 255 255


  # Start of LAYER DEFINITIONS
  LAYER # States polygon layer begins here
    NAME         principali-parmigiana
    DATA         principali-parmigiana

    STATUS       DEFAULT
    TYPE         POLYGON

    CLASS
      COLOR        232 232 232
      OUTLINECOLOR 32 32 32
    END
  END
  # End of LAYER DEFINITIONS

END # end of map file/object

---------------------------------------------------------------------------

This way Mapserver refuses to build the image, while if I keep the old
EXTENT data from the original example, all I get is a blank image.


Moreover, if I run ogrinfo over the original "states_ugl" shape file of
example1-1.map, I get completely different values:
---------------------------------------------------------------------------
INFO: Open of `c:\Inetpub\wwwroot\tutorial\data\states_ugl.shp'
using driver `ESRI Shapefile' successful.

Layer name: states_ugl
Geometry: Polygon
Feature Count: 204
Extent: (-97.238976, 41.619778) - (-82.122902, 49.385620)
---------------------------------------------------------------------------

Now I am starting to think about a unit mismatch. May it be so? Again I am
very sorry to ask lame questions for a GIS professional, but until now I
never had to deal with these kind of problems.

Thanks again.
-- 
Ciao
Nico



More information about the MapServer-users mailing list