beginner: Again MapInfo .tab .dat .id .map with white image
dmorissette at MAPGEARS.COM
Thu Mar 1 10:00:23 EST 2007
The extents that you specified in your mapfile doesn't overlap with the
extent of your data.
Try setting the following default extents in your mapfile, that will
probably give much better results:
EXTENT 2365748 4851330 2366928 4852759
Julien Buratto wrote:
> Hi there, happy to enter the world of mapping :-D
> I've been reading past posts about this topic, but I could not
> figure-out how to solve my problem.
> An institution in my country passed me the MapInfo cds with hundreds of
> files, name XXXXXXX.TAB .DAT .ID .MAP
> At the beginning I was desperate (yeye geek panic), then I ogr2ogr all
> them to postgis and I was feeling confortable, but could not generate my
> first map (always the same, white, invisibile gif square :-D)
> Then I decide to use the CONNECTIONTYPE OGR directly to those files
> because shp2img was complaining about some SQL and I thought it was not
> worth at the beginning to use postgis, better start with MapInfo files.
> My ogrinfo reports a loooong long report showing each row of data
> present, while the summary shows (for one file):
> ogrinfo /root/data_cd/269140.TAB -summary 269140
> Had to open data source read-only.
> INFO: Open of `/root/dati_cd/269140.TAB'
> using driver `MapInfo File' successful.
> Layer name: 269140
> Geometry: Unknown (any)
> Feature Count: 386
> Extent: (2365748.451000, 4851329.181000) - (2366928.857000, 4852758.777000)
> Layer SRS WKT:
> SPHEROID["International 1924",6378388,297],
> ID: Integer (0.0)
> TIPO: String (15.0)
> LIVELLO: String (15.0)
> NUMFOGLIO: Integer (0.0)
> NOMFOGLIO: String (30.0)
> DESCRIZIONE: String (100.0)
> TOPONIMO: String (60.0)
> QUOTA1: Real (0.0)
> QUOTA2: Real (0.0)
> Well, my MAP is now:
> NAME DEMO
> STATUS ON
> SIZE 400 300
> UNITS METERS
> IMAGECOLOR 255 255 255
> FONTSET ../etc/fonts.txt
> EXTENT 0 0 3072800 3840000
> NAME "269140"
> TYPE RASTER
> STATUS DEFAULT
> CONNECTIONTYPE OGR
> CONNECTION "/root/dati_cd/269140.TAB"
> STYLEITEM "AUTO"
> NAME "Elevation Poly 5"
> OUTLINECOLOR 0 0 0
> COLOR 128 128 128
> END # Layer
> When I hit "shp2img" I don't get errors, the file is generated white.
> My questions are:
> 1) Could be a problem of EXTENT ?
> 2) Howcomes I set a non-existant file as connection and the shp2img goes
> on without errors ? Shouldn't say something like "connection file not
> found" ?
> 3) As I have hundreds of these files, should I create a LAYER for each
> file ?
> Thanks for your patience, and hope to show you my work online asap!
More information about the mapserver-users