[Mapserver-users] world files and tile indexing

Ed McNierney ed at topozone.com
Sat May 1 13:39:07 EDT 2004


This is a multi-part message in MIME format.

------_=_NextPart_001_01C42FA3.3437712E
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Antonio -
=20
Thanks - that is very helpful!
=20
Things seem fine, but you need to create georeference data for the
images in a way that can be used - the JPG files could have world files
(.JGW files) or the TIF files could have world files (.TFW) but you need
them.  You need to create these world files.  You should try to read the
coordinates from the shapefile (use shpdump) and you need to calculate
the values for the world files.  With only three files you can
relatively easily do this by hand.
=20
The shapefile polygons should give you the upper-left corner coordinate
of each tile, and you should be able to calculate the size of each pixel
in X and Y units from the shapefile polygons and information about how
many pixels wide and high each image is (use tiffinfo).
=20
    - Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242=20


  _____ =20

From: Antonio Cosenza [mailto:antonio.cosenza at polito.it]=20
Sent: Saturday, May 01, 2004 6:18 AM
To: mapserver-users at lists.gis.umn.edu
Subject: Re: [Mapserver-users] world files and tile indexing




	It would help if you could explain what you're trying to do! =20

ok, i'll try tou explain you my situation!


	What
	format are the raster files in now,=20

The raster files are in jpg format.  They are a set of 3 tiles NOT
GEOREFERENCED (of course, they are jpg!). But, i have a shapefile,
called tile.shp (so, georeferenced) representing the footprints of  the
tiles. In tile.shp, I created a field (Path) including the absoulte path
to tiff tiles on my disk (ex. /var/www/.....F4-C4.tif).Now,  i converted
the jpg files in tiff files, without the world files. I use this mapfile
configuration:

 LAYER
    NAME "pannelli"
    STATUS ON
    TYPE RASTER
    TILEINDEX "./tile.shp"
    TILEITEM "Path"
  END

I run maplab, but an error occurs: unable to open tiff files:


Description=09
Unable to open world file for reading. in
/maplab/htdocs/common/wrapper/drawmap.php=09
Failed to draw layer named 'pannelli'. in
/maplab/htdocs/common/wrapper/drawmap.php=09
Unable to open world file for reading. in
/maplab/htdocs/common/wrapper/drawmap.php=09
Failed to draw layer named 'pannelli'. in
/maplab/htdocs/common/wrapper/drawmap.php=09

So, i created some empty world files! This time, maplab runs without
error, but it doesn't show me the tiles. It shows me only a blank page.
Where is the problem?




	and what geographic reference data
	do you have for them (and in what format)?
=09
		- Ed
=09
	Ed McNierney
	President and Chief Mapmaker
	TopoZone.com / Maps a la carte, Inc.
	73 Princeton Street, Suite 305
	North Chelmsford, MA  01863
	ed at topozone.com
	(978) 251-4242 =20
=09
	-----Original Message-----
	From: Antonio Cosenza [mailto:antonio.cosenza at polito.it]=20
	Sent: Friday, April 30, 2004 5:43 AM
	To: Ed McNierney; mapserver-users at lists.gis.umn.edu
	Subject: Re: [Mapserver-users] world files and tile indexing
=09
	so, i need to convert the raster tiles in tiff format, without
world
	files? Right?
=09
	thanks
=09
	Ed McNierney wrote:
=09
	 =20

		Antonio -
	=09
		Yes, as long as the georeference information is there
for the tile=20
		index to be created (and for the image to be rendered
properly). =20
		GeoTIFFs can be used in a TILEINDEX layer without world
files.
	=09
			- Ed
	=09
		Ed McNierney
		President and Chief Mapmaker
		TopoZone.com / Maps a la carte, Inc.
		73 Princeton Street, Suite 305
		North Chelmsford, MA  01863
		ed at topozone.com
		(978) 251-4242
	=09
		-----Original Message-----
		From: Antonio Cosenza [mailto:antonio.cosenza at polito.it]
		Sent: Thursday, April 29, 2004 2:40 PM
		To: mapserver-users at lists.gis.umn.edu
		Subject: [Mapserver-users] world files and tile indexing
	=09
		Hi everyvody,
		is it possible to use tile indexing without world file?
	=09
		thanks
		_______________________________________________
		Mapserver-users mailing list
		Mapserver-users at lists.gis.umn.edu
=09
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
	=09
	=09
		=20
	=09
		   =20

=09
=09
=09
	_______________________________________________
	Mapserver-users mailing list
	Mapserver-users at lists.gis.umn.edu
	http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
=09
	 =20



------_=_NextPart_001_01C42FA3.3437712E
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY text=3D#000000 bgColor=3D#ffffff>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Antonio -</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Thanks - that is very =
helpful!</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>Things seem fine, but you need to create =
georeference data=20
for the images in a way that can be used - the JPG files could have =
world files=20
(.JGW files) or the TIF files could have world files (.TFW) but you need =

them.&nbsp; You need to create these world files.&nbsp; You should try =
to read=20
the coordinates from the shapefile (use shpdump) and you need to =
calculate the=20
values for the world files.&nbsp; With only three files you can =
relatively=20
easily do this by hand.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>The shapefile polygons should give you the =
upper-left=20
corner coordinate of each tile, and you should be able to calculate the =
size of=20
each pixel in X and Y units from the shapefile polygons and information =
about=20
how many pixels wide and high each image is (use =
tiffinfo).</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004><FONT =
face=3DArial=20
color=3D#0000ff size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN =
class=3D456053617-01052004>&nbsp;&nbsp;&nbsp; <FONT=20
face=3DArial color=3D#0000ff size=3D2>- Ed</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D456053617-01052004>
<P><FONT size=3D2>Ed McNierney<BR>President and Chief =
Mapmaker<BR>TopoZone.com /=20
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North =
Chelmsford,=20
MA&nbsp; 01863<BR>ed at topozone.com<BR>(978) 251-4242 =
</FONT></P></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B> Antonio Cosenza=20
[mailto:antonio.cosenza at polito.it] <BR><B>Sent:</B> Saturday, May 01, =
2004 6:18=20
AM<BR><B>To:</B> mapserver-users at lists.gis.umn.edu<BR><B>Subject:</B> =
Re:=20
[Mapserver-users] world files and tile indexing<BR></FONT><BR></DIV>
<DIV></DIV><BR>
<BLOCKQUOTE =
cite=3Dmid13858AA1A74F30419F319ACB66A9D1224E4426 at mercator.topozone.com=20
type=3D"cite"><PRE wrap=3D"">It would help if you could explain what =
you're trying to do!  </PRE></BLOCKQUOTE>ok,=20
i'll try tou explain you my situation!<BR>
<BLOCKQUOTE =
cite=3Dmid13858AA1A74F30419F319ACB66A9D1224E4426 at mercator.topozone.com=20
type=3D"cite"><PRE wrap=3D"">What
format are the raster files in now, </PRE></BLOCKQUOTE>The raster files =
are in=20
jpg format.&nbsp; They are a set of 3 tiles NOT GEOREFERENCED (of =
course, they=20
are jpg!). But, i have a shapefile, called tile.shp (so, georeferenced)=20
representing the footprints of&nbsp; the tiles. In tile.shp, I created a =
field=20
(Path) including the absoulte path to tiff tiles on my disk (ex.=20
/var/www/.....F4-C4.tif).Now,&nbsp; i converted the jpg files in tiff =
files,=20
without the world files. I use this mapfile=20
configuration:<BR><BR>&nbsp;LAYER<BR>&nbsp;&nbsp;&nbsp; NAME=20
"pannelli"<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; TYPE=20
RASTER<BR>&nbsp;&nbsp;&nbsp; TILEINDEX =
"./tile.shp"<BR>&nbsp;&nbsp;&nbsp;=20
TILEITEM "Path"<BR>&nbsp; END<BR><BR>I run maplab, but an error occurs: =
unable=20
to open tiff files:<BR><BR>
<TABLE cellSpacing=3D0 cellPadding=3D2 border=3D0>
  <TBODY>
  <TR>
    <TD colSpan=3D2><FONT face=3DArial,Helvetica,sans-serif =
color=3D#000000=20
      size=3D2>Description</FONT></TD></TR>
  <TR>
    <TD colSpan=3D2><FONT face=3DARIAL,Helvetica,sans-serif =
color=3D#ff3333=20
      size=3D2>Unable to open world file for reading. in=20
      /maplab/htdocs/common/wrapper/drawmap.php</FONT></TD></TR>
  <TR>
    <TD colSpan=3D2><FONT face=3DARIAL,Helvetica,sans-serif =
color=3D#ff3333=20
      size=3D2>Failed to draw layer named 'pannelli'. in=20
      /maplab/htdocs/common/wrapper/drawmap.php</FONT></TD></TR>
  <TR>
    <TD colSpan=3D2><FONT face=3DARIAL,Helvetica,sans-serif =
color=3D#ff3333=20
      size=3D2>Unable to open world file for reading. in=20
      /maplab/htdocs/common/wrapper/drawmap.php</FONT></TD></TR>
  <TR>
    <TD colSpan=3D2><FONT face=3DARIAL,Helvetica,sans-serif =
color=3D#ff3333=20
      size=3D2>Failed to draw layer named 'pannelli'. in=20
      =
/maplab/htdocs/common/wrapper/drawmap.php</FONT></TD></TR></TBODY></TABLE=
><BR>So,=20
i created some empty world files! This time, maplab runs without error, =
but it=20
doesn't show me the tiles. It shows me only a blank page.<BR>Where is =
the=20
problem?<BR><BR><BR>
<BLOCKQUOTE =
cite=3Dmid13858AA1A74F30419F319ACB66A9D1224E4426 at mercator.topozone.com=20
type=3D"cite"><PRE wrap=3D"">and what geographic reference data
do you have for them (and in what format)?

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ed at topozone.com">ed at topozone.com</A>
(978) 251-4242 =20

-----Original Message-----
From: Antonio Cosenza [<A class=3Dmoz-txt-link-freetext =
href=3D"mailto:antonio.cosenza at polito.it">mailto:antonio.cosenza at polito.i=
t</A>]=20
Sent: Friday, April 30, 2004 5:43 AM
To: Ed McNierney; <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:mapserver-users at lists.gis.umn.edu">mapserver-users at lists.g=
is.umn.edu</A>
Subject: Re: [Mapserver-users] world files and tile indexing

so, i need to convert the raster tiles in tiff format, without world
files? Right?

thanks

Ed McNierney wrote:

  </PRE>
  <BLOCKQUOTE type=3D"cite"><PRE wrap=3D"">Antonio -

Yes, as long as the georeference information is there for the tile=20
index to be created (and for the image to be rendered properly). =20
GeoTIFFs can be used in a TILEINDEX layer without world files.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:ed at topozone.com">ed at topozone.com</A>
(978) 251-4242

-----Original Message-----
From: Antonio Cosenza [<A class=3Dmoz-txt-link-freetext =
href=3D"mailto:antonio.cosenza at polito.it">mailto:antonio.cosenza at polito.i=
t</A>]
Sent: Thursday, April 29, 2004 2:40 PM
To: <A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:mapserver-users at lists.gis.umn.edu">mapserver-users at lists.g=
is.umn.edu</A>
Subject: [Mapserver-users] world files and tile indexing

Hi everyvody,
is it possible to use tile indexing without world file?

thanks
_______________________________________________
Mapserver-users mailing list
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:Mapserver-users at lists.gis.umn.edu">Mapserver-users at lists.g=
is.umn.edu</A>
<A class=3Dmoz-txt-link-freetext =
href=3D"http://lists.gis.umn.edu/mailman/listinfo/mapserver-users">http:/=
/lists.gis.umn.edu/mailman/listinfo/mapserver-users</A>


=20

    </PRE></BLOCKQUOTE><PRE wrap=3D""><!---->


_______________________________________________
Mapserver-users mailing list
<A class=3Dmoz-txt-link-abbreviated =
href=3D"mailto:Mapserver-users at lists.gis.umn.edu">Mapserver-users at lists.g=
is.umn.edu</A>
<A class=3Dmoz-txt-link-freetext =
href=3D"http://lists.gis.umn.edu/mailman/listinfo/mapserver-users">http:/=
/lists.gis.umn.edu/mailman/listinfo/mapserver-users</A>

  </PRE></BLOCKQUOTE><BR></BODY></HTML>

------_=_NextPart_001_01C42FA3.3437712E--



More information about the mapserver-users mailing list