gdaltindex raster files (MapInfo gif + tab format) {Scanned} {Scanned}

Zhonghai Wang zhonghaiw at GMAIL.COM
Tue May 23 08:55:30 EDT 2006


Hi Zoltan,

using external script code snippets to create worldfiles is sure an option
for this case, but I do not know how to use awk script, I hear it for the
first time.

I realize that all my GIFs may be merged into one large TIF image using
gdal_merge.py command, but unfortunately I can not use it under MS4W 4.8.1,
because this command only can be performed under Python support.

I am now trying to do it in this way, but I am not sure if it works.

thanks for your ideas

zhonghai

On 5/23/06, Siki Zoltan <siki at agt.bme.hu> wrote:
>
> Hi,
>
> You must create world files from mapinfo tabs.
> I could do it by an awk script, but my case was special.
> Nonearth coordinates and the four corners were given in the tab files and
> no rotation.
> ^ y
> |3          4
> +----------+
> |          |
> |          |
> +----------+ ------> x
> 1          2
>
> tab file contains raster coordinates like (0,0) for point 3 and the world
> coordinates.
>
> you can get the first row in the world file:
> (x2 - x1) / (col2 - col1)    called dx
> The second and third rows are zeros if no rotation
> fourth row
> (y3 - y1) / (row3 - row1)    called dy (it is always negative)
> the last two rows are the x,y coordinates of the center of the top-left
> pixel
> x3 + dx / 2
> y3 + dy / 2
>
> I hope this helps you
>
> Zoltan
>
> On Tue, 23 May 2006, Zhonghai Wang wrote:
>
> > Hi guys,
>
> any further ideas for this topic?
>
> l am really overwhelmed by it.
>
> since I have a amount of small GIF+TAB files, if I really need to create
> worldfiles for all the GIFs, it will be a huge project and seems not be
> possible.
>
> thanks a lot for any idea I can try.
>
> zhonghai
>
> On 5/22/06, Zhonghai Wang <zhonghaiw at gmail.com> wrote:
> >
> >  Hi,
> >
> > I've checked using "mapserv -v" and the GIF is supported.
> >
> > but it's strange that I can not performed "gdalinfo --formats" or
> > "gdal-congif --formats" to check if the GIF format is supported. I am
> using
> > the precomplied MS4W on WinXP. Does this mean that my gdal utility is
> not
> > really working? but I still can use some commands such as "gdalinfo" and
> > "gdal_translate".
> >
> > zhongahi
> >
> >  On 5/22/06, Zhonghai Wang <zhonghaiw at gmail.com> wrote:
> > >
> > >  Hi guys,
> > >
> > > I get some info again from the "Raster Dat Access" document, and it
> > > indicates that:
> > >
> > > ****
> > > GIF: If GD is configured with GIF (OUTPUT=GIF) support, then MapServer
> > > will also be able to read GIF files for raster layers. The only way to
> > > georeference GIF files is with a world file.
> > >
> > > If GD is not configured with GIF support, it may still be available in
> > > GDAL
> > >
> > > ****
> > >
> > > Is it true that GIF raster images can only be georeferenced with a
> > > worldfiles? TAB files are not supported?
> > >
> > > zhonghai
> > >  On 5/22/06, Zhonghai Wang <zhonghaiw at gmail.com > wrote:
> > > >
> > > >  Hi guys,
> > > >
> > > > I've found a way to do that, like this:
> > > >
> > > > c:\.....rasterdata>dir /b /s tem\*.gif > index.txt
> > > > c:\.....rasterdata>gdaltindex index.shp --optfile index.txt
> > > >
> > > > and this works well.
> > > >
> > > > but georeferencing information in the TAB file can not be found by
> the
> > > > command, an error message is something like:
> > > >
> > > > >>>no georeferencing info is available, gdaltindex performance will
> be
> > > > skipped.
> > > >
> > > > actually there is georeferencing info in the TAB file, for each
> small
> > > > gif image there is a corresponding TAB, e.g.:
> > > > ***
> > > > !table
> > > > !version 300
> > > > !charset WindowsLatin1
> > > >
> > > > Definition Table
> > > >   File "m_1_1_1000.gif"
> > > >   Type "RASTER"
> > > >   (5.290517,48.2308475) (1392,987) Label "Pt 1",
> > > >   (5.25001439194036,48.25) (0,0) Label "Pt 2",
> > > >   (5.25001439194036 ,48.211695) (0,1974) Label "Pt 3",
> > > >   (5.33101960805964,48.25) (2784,0) Label "Pt 4",
> > > >   (5.33101960805964,48.211695) (2784,1974) Label "Pt 5"
> > > >   CoordSys Earth Projection 1, 104
> > > >   Units "degree"
> > > > ***
> > > >
> > > > why can it not be read by gdal?
> > > >
> > > > thanks a lot
> > > >  zhonghai
> > > >
> > > > On 5/22/06, Mateusz Loskot <mateusz at loskot.net > wrote:
> > > >
> > > > > Rahkonen Jukka wrote:
> > > > > > Very first you can try giving the full path to your images, I
> mean
> > > > > > c:\...\rasterdata\tem\*.gif. Let's see what happens.
> > > > >
> > > > > It should not be the case.
> > > > > I've checked gdaltindex from latest FWTools on Windows and
> > > > > it works with relative and absolute paths.
> > > > > Also, you can use forward or back slash:
> > > > >
> > > > > gdaltindex test.shp data/*.tif
> > > > >
> > > > > gdaltindex test.shp data\*.tif
> > > > >
> > > > > Although, gdaltindex usage message suggests to use the former
> > > > > version
> > > > > with Unix-like forward slash.
> > > > >
> > > > > Cheers
> > > > > --
> > > > > Mateusz Łoskot
> > > > > http://mateusz.loskot.net
> > > > >
> > > >
> > > >
> > >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060523/fecd8edf/attachment.html


More information about the mapserver-users mailing list