Re: [mapserver-users] problem with raster data..

2009-02-02 Thread Stephen Woodbridge

The tileindex is used in a layer like you have shown below.
Your map image is built-up from the layers in the mapfile. The first 
layers are drawn into the output image first and so on through the 
mapfile. So if you want your images to be the background of the image 
then put that layer first in the mapfile and all other layers will be 
drawn on top of that.


Also for directory paths, I think it is best if you lay them out 
something like:


/path/to/data/
/path/to/data/nztm/...

then:

cd /path/to/data/
gdaltindex 250k_index.shp nztm/250Kfiles/*.tif
shptree 250k_index.shp

adjust the paths as appropriate. Then in your mapfile

DATAPATH /path/to/data

...
LAYER
  ...
  TILEINDEX 250k_index

basically start out putting all your tileindexes in /path/to/data and 
putting all your data in sub directories. This is a simple setup and 
should always work, so start like this. Then you can experiment with 
moving directories and tileindexes around. The reason for this is that 
the rules for how mapserver finds files is not always obvious and 
sometimes requires reading the code or a little simple experimentation 
to get it right.


-Steve


MeLv1n wAuRaN wrote:
  Ok so basically it is done right? it created sample_index.dbf, 
sample_index.shp, and sample_index.shx. Now, which file should i load 
into the .MAP as my basemap?


An example from Robert Sanson:

LAYER
  NAME nz250ktm
  GROUP Toposcans
  TYPE RASTER
  STATUS ON
  TILEINDEX ../data/nztm/250k_index
  TILEITEM Location
  MAXSCALE 30
  MINSCALE 75000

well, this is a layer right? what i mean is, this tile index will be the 
basemap of the map instead of a layer, for example llike:


MAP
   NAME ...
   STATUS 
   EXTENT 
   IMAGETYPE 
   SIZE ..
   SHAPEPATH ...
   IMAGECOLOR .
   .
   .
   .
END


or is this tileindex supposed to be a layer instead of a basemap?


--- On *Mon, 2/2/09, Stephen Woodbridge /wood...@swoodbridge.com/* wrote:

From: Stephen Woodbridge wood...@swoodbridge.com
Subject: Re: [mapserver-users] problem with raster data..
To: death_knight0...@yahoo.com
Cc: Robert Sanson sans...@asurequality.com,
mapserver-users@lists.osgeo.org
Date: Monday, February 2, 2009, 12:26 PM

MeLv1n wAuRaN
 wrote:
   i already included the gdaltindex path in the environment variable. But
another error occured, it said:
 
 C:\ms4w\data\rastergdaltindex sample_index.shp

sample*.tif
 ERROR 4: Unable to open sample_index.shp or sample_index.SHP.
 Creating new index file...

This error is ok, it is just telling you that the index file does not 
already
exist and it is creating a new one. gdaltindex appends to an existing file 
so
keep that in mind if you need to add to your tileindex.

 ERROR 4: `sample*.tif' does not exist in the file system,
 and is not recognised as a supported dataset name.

This says that there are no files in the current directory named sample*.tif
what does a dir command respond with?

-Steve W

 Unable to open sample*.tif, skipping.
 
 what do you think is the problem here?


 





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] problem with raster data..

2009-02-02 Thread Jeff McKenna

MeLv1n wAuRaN wrote:
Ok so basically it is done right? it created sample_index.dbf, 
sample_index.shp, and sample_index.shx. Now, which file should i load 
into the .MAP as my basemap?


Not necessarily.  You should address StephenW's previous question 
(because if there is an error with the gdaltindex command an empty 
shapefile is created, which is no good to you).


To verify the 'sample_index.shp' file you should open it in QGIS and 
view it's attributes (there should be a record for each tif file).   For 
an example of what an index file should look like, see the screengrabs 
in http://www.mapserver.org/utilities/tile4ms.html




An example from Robert Sanson:

LAYER
  NAME nz250ktm
  GROUP Toposcans
  TYPE RASTER
  STATUS ON
  TILEINDEX ../data/nztm/250k_index
  TILEITEM Location
  MAXSCALE 30
  MINSCALE 75000

well, this is a layer right? what i mean is, this tile index will be the 
basemap of the map instead of a layer, for example llike:




correct, you would point to your valid 'sample_index.shp' file in the 
TILEINDEX parameter.


-jeff



--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] problem with raster data..

2009-02-02 Thread MeLv1n wAuRaN
Ok so basically it is done right? it created sample_index.dbf, 
sample_index.shp, and sample_index.shx. Now, which file should i load into the 
.MAP as my basemap?

An example from Robert Sanson:

LAYER
  NAME nz250ktm
  GROUP Toposcans
  TYPE RASTER
  STATUS ON
  TILEINDEX ../data/nztm/250k_index
  TILEITEM Location
  MAXSCALE 30
  MINSCALE 75000

well, this is a layer right? what i mean is, this tile index will be the 
basemap of the map instead of a layer, for example llike:

MAP
   NAME ...
   STATUS 
   EXTENT 
   IMAGETYPE 
   SIZE ..
   SHAPEPATH ...
   IMAGECOLOR .
   .
   .
   .
END


or is this tileindex supposed to be a layer instead of a basemap?


--- On Mon, 2/2/09, Stephen Woodbridge wood...@swoodbridge.com wrote:
From: Stephen Woodbridge wood...@swoodbridge.com
Subject: Re: [mapserver-users] problem with raster data..
To: death_knight0...@yahoo.com
Cc: Robert Sanson sans...@asurequality.com, mapserver-users@lists.osgeo.org
Date: Monday, February 2, 2009, 12:26 PM

MeLv1n wAuRaN wrote:
   i already included the gdaltindex path in the environment variable. But
another error occured, it said:
 
 C:\ms4w\data\rastergdaltindex sample_index.shp
sample*.tif
 ERROR 4: Unable to open sample_index.shp or sample_index.SHP.
 Creating new index file...

This error is ok, it is just telling you that the index file does not already
exist and it is creating a new one. gdaltindex appends to an existing file so
keep that in mind if you need to add to your tileindex.

 ERROR 4: `sample*.tif' does not exist in the file system,
 and is not recognised as a supported dataset name.

This says that there are no files in the current directory named sample*.tif
what does a dir command respond with?

-Steve W

 Unable to open sample*.tif, skipping.
 
 what do you think is the problem here?
 




  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] problem with raster data..

2009-02-01 Thread MeLv1n wAuRaN
i already included the gdaltindex path in the environment variable. But another 
error occured, it said: 

C:\ms4w\data\rastergdaltindex sample_index.shp sample*.tif
ERROR 4: Unable to open sample_index.shp or sample_index.SHP.
Creating new index file...
ERROR 4: `sample*.tif' does not exist in the file system,
and is not recognised as a supported dataset name.

Unable to open sample*.tif, skipping.

what do you think is the problem here?

--- On Sat, 1/31/09, Robert Sanson sans...@asurequality.com wrote:
From: Robert Sanson sans...@asurequality.com
Subject: Re: [mapserver-users] problem with raster data..
To: death_knight0...@yahoo.com
Date: Saturday, January 31, 2009, 12:27 PM


 
It looks like it can't find gdaltindex.exe in the PATH environment variable. 
You will have to add the directory that gdaltindex.erxe lives in to your PATH 
variable, via Control Panel.
 
Option 2 is to specify the location of gdaltindex.exe when you run it:
 
eg.
 
C:\ms4w\data\rasterC:\ms4w\tools\gdaltindex sample_index.shp sample*.tif

Robert

 MeLv1n wAuRaN death_knight0...@yahoo.com 30/01/2009 4:36 p.m. 




hi again robert,

i tried running it in the cmd but it gives me an error message:

C:\ms4w\data\rastergdaltindex sample_index.shp sample*.tif
'gdaltindex' is not recognized as an internal or external command,
operable program or batch file.

so, what did i miss in the mapserver configuration? i'm using MS4W_2.3.1


--- On Fri, 1/30/09, Robert Sanson sans...@asurequality.com wrote:

From: Robert Sanson sans...@asurequality.com
Subject: Re: [mapserver-users] problem with raster data..
To: death_knight0...@yahoo.com
Date: Friday, January 30, 2009, 11:11 AM



If you intend to store the sample_index.shp file in the same directory as your 
TIF files, then open a DOS cmd window and navigate to that directory cd 
c:\ms4w\data\raster. once you are there, simply run:
 
gdaltindex sample_index.shp sample*.tif
 
This will create the sample_index.shp file in that directory. the accompanying 
.dbf file will haev a single attribute field Location that will hold the name 
of each TIF file.
 
If you want, you can spatially index this file using the shptree utility that 
comes with Mapserver. It will create a spatial index .qix file.
 
In your Map file you will need to specify the location of the sample_index.
 
regards,
 
Robert




Click here to report this email as spam.


--

The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.

--


This message has been scanned for malware by SurfControl plc.  
www.surfcontrol.com



  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] problem with raster data..

2009-02-01 Thread Stephen Woodbridge

MeLv1n wAuRaN wrote:
  i already included the gdaltindex path in the environment variable. 
But another error occured, it said:


C:\ms4w\data\rastergdaltindex sample_index.shp sample*.tif
ERROR 4: Unable to open sample_index.shp or sample_index.SHP.
Creating new index file...


This error is ok, it is just telling you that the index file does not 
already exist and it is creating a new one. gdaltindex appends to an 
existing file so keep that in mind if you need to add to your tileindex.



ERROR 4: `sample*.tif' does not exist in the file system,
and is not recognised as a supported dataset name.


This says that there are no files in the current directory named 
sample*.tif what does a dir command respond with?


-Steve W


Unable to open sample*.tif, skipping.

what do you think is the problem here?

--- On *Sat, 1/31/09, Robert Sanson /sans...@asurequality.com/* wrote:

From: Robert Sanson sans...@asurequality.com
Subject: Re: [mapserver-users] problem with raster data..
To: death_knight0...@yahoo.com
Date: Saturday, January 31, 2009, 12:27 PM

It looks like it can't find gdaltindex.exe in the PATH environment
variable. You will have to add the directory that gdaltindex.erxe
lives in to your PATH variable, via Control Panel.
 
Option 2 is to specify the location of gdaltindex.exe when you run it:
 
eg.
 
C:\ms4w\data\rasterC:\ms4w\tools\gdaltindex sample_index.shp

sample*.tif
Robert

  MeLv1n wAuRaN death_knight0...@yahoo.com 30/01/2009 4:36 p.m. 
hi again robert,

i tried running it in the cmd but it gives me an error message:

C:\ms4w\data\rastergdaltindex sample_index.shp sample*.tif
'gdaltindex' is not recognized as an internal or external command,
operable program or batch file.

so, what did i miss in the mapserver configuration? i'm using MS4W_2.3.1


--- On *Fri, 1/30/09, Robert Sanson /sans...@asurequality.com/* wrote:

From: Robert Sanson sans...@asurequality.com
Subject: Re: [mapserver-users] problem with raster data..
To: death_knight0...@yahoo.com
Date: Friday, January 30, 2009, 11:11 AM

If you intend to store the sample_index.shp file in the same
directory as your TIF files, then open a DOS cmd window and
navigate to that directory cd c:\ms4w\data\raster. once you
are there, simply run:
 
gdaltindex sample_index.shp sample*.tif
 
This will create the sample_index.shp file in that directory.

the accompanying .dbf file will haev a single attribute field
Location that will hold the name of each TIF file.
 
If you want, you can spatially index this file using the shptree

utility that comes with Mapserver. It will create a spatial
index .qix file.
 
In your Map file you will need to specify the location of the

sample_index.
 
regards,
 
Robert





Click here https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
to report this email as spam.




--
The contents of this email are confidential to AsureQuality. If you have 
received this communication in error please notify the sender immediately and 
delete the message and any attachments. The opinions expressed in this email 
are not necessarily those of AsureQuality. This message has been scanned for 
known viruses before delivery. AsureQuality supports the Unsolicited Electronic 
Messages Act 2007. If you do not wish to receive similar communications in 
future, please notify the sender of this message.
--



This message has been scanned for malware by SurfControl plc.
www.surfcontrol.com http://www.surfcontrol.com/





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] problem with raster data..

2009-01-30 Thread Christy Nieman

Melvin,

The syntax is:
   gdaltindex /name_of_tile_index/.shp /location_of_rasters

/So, for your example, the syntax would look something like:
   gdaltindex sample_index.shp c:\ms4w\data\raster\*.tif


Regards,

Christy
--
Christy Nieman
GIS Technician
DM Solutions Group, Inc.
Email: cnie...@dmsolutions.ca
Web: http://dmsolutions.ca
Web: http://research.dmsolutions.ca
Phone: 613-565-5056 x12

MeLv1n wAuRaN wrote:


Ok from the example:  gdaltindex doq_index.shp doq/*.tif   how do i
include the different tif files? 

for example there are 3 .tif : 1. sample_1.tif  
   2. sample_2.tif

   3. sample_3.tif

location: c:\ms4w\data\raster\

how will the syntax look like when i create an index name sample_index?





--- On *Fri, 1/30/09, Christy Nieman /cnie...@dmsolutions.ca/* wrote:

From: Christy Nieman cnie...@dmsolutions.ca
Subject: Re: [mapserver-users] problem with raster data..
To: death_knight0...@yahoo.com
Cc: mapserver-users@lists.osgeo.org
Date: Friday, January 30, 2009, 10:27 AM

Hi
 Melvin,

Using a tool such as gdaltindex (see http://www.gdal.org/gdaltindex.html and
http://mapserver.org/optimization/tileindex.html#tileindex) you can create a
shapefile tile index that will give MapServer the information it needs to 
use
the required rasters for the current map extent.  In the shapefile there 
will be
one feature that is the bounding box of each raster file, and an attribute 
that
contains the path to the raster that each feature represents.

Christy

MeLv1n wAuRaN wrote:
 hi all,
 
 right now i have 50 .TIF files (a whole map of my region) my question is,

is it possible for mapserver to load 50 .TIF files all together as a 
basemap?
because from the tutorial i read, the samples only load 1 raster file..so,
i'm wondering if it's possible to load all the 50 TIF files to the same
.MAP
 
 if not, then how do i merge all the TIF files into a single TIF?

 because
when i load them all together in ArcMap it forms a whole map.
 
 for the information, i'm still a newbie...so i still need alot of

advices from the experts.
 
 thanks for your help,

 Melvin
 
 
 
 
 ___

 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
   





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] problem with raster data..

2009-01-29 Thread Christy Nieman

Hi Melvin,

Using a tool such as gdaltindex (see http://www.gdal.org/gdaltindex.html 
and http://mapserver.org/optimization/tileindex.html#tileindex) you can 
create a shapefile tile index that will give MapServer the information 
it needs to use the required rasters for the current map extent.  In the 
shapefile there will be one feature that is the bounding box of each 
raster file, and an attribute that contains the path to the raster that 
each feature represents.


Christy

MeLv1n wAuRaN wrote:

hi all,

right now i have 50 .TIF files (a whole map of my region) my question 
is, is it possible for mapserver to load 50 .TIF files all together as 
a basemap? because from the tutorial i read, the samples only load 1 
raster file..so, i'm wondering if it's possible to load all the 50 TIF 
files to the same .MAP


if not, then how do i merge all the TIF files into a single TIF? 
because when i load them all together in ArcMap it forms a whole map.


for the information, i'm still a newbie...so i still need alot of 
advices from the experts.


thanks for your help,
Melvin




___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
  

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] problem with raster data..

2009-01-29 Thread MeLv1n wAuRaN

Ok from the example:  gdaltindex doq_index.shp doq/*.tif   how do i
include the different tif files? 

for example there are 3 .tif : 1. sample_1.tif  
   2. sample_2.tif
   3. sample_3.tif

location: c:\ms4w\data\raster\

how will the syntax look like when i create an index name sample_index?



--- On Fri, 1/30/09, Christy Nieman cnie...@dmsolutions.ca wrote:
From: Christy Nieman cnie...@dmsolutions.ca
Subject: Re: [mapserver-users] problem with raster data..
To: death_knight0...@yahoo.com
Cc: mapserver-users@lists.osgeo.org
Date: Friday, January 30, 2009, 10:27 AM

Hi Melvin,

Using a tool such as gdaltindex (see http://www.gdal.org/gdaltindex.html and
http://mapserver.org/optimization/tileindex.html#tileindex) you can create a
shapefile tile index that will give MapServer the information it needs to use
the required rasters for the current map extent.  In the shapefile there will be
one feature that is the bounding box of each raster file, and an attribute that
contains the path to the raster that each feature represents.

Christy

MeLv1n wAuRaN wrote:
 hi all,
 
 right now i have 50 .TIF files (a whole map of my region) my question is,
is it possible for mapserver to load 50 .TIF files all together as a basemap?
because from the tutorial i read, the samples only load 1 raster file..so,
i'm wondering if it's possible to load all the 50 TIF files to the same
.MAP
 
 if not, then how do i merge all the TIF files into a single TIF? because
when i load them all together in ArcMap it forms a whole map.
 
 for the information, i'm still a newbie...so i still need alot of
advices from the experts.
 
 thanks for your help,
 Melvin
 
 
 
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
   


  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] problem with raster data..

2009-01-29 Thread Robert Sanson
Hi Melvin
 
Sure - create a TILEINDEX. gdal has a utility called gdaltindex to create it. 
This creates a Shapefile of the extents of each raster. You specify the name of 
this Shapefile in your Map file eg.
 
 LAYER
  NAME nz250ktm
  GROUP Toposcans
  TYPE RASTER
  STATUS ON
  TILEINDEX ../data/nztm/250k_index
  TILEITEM Location
  MAXSCALE 30
  MINSCALE 75000
 
  METADATA
   ows_titleNZ 1:250k scale NZTM
   ows_abstractThis layer came from scans of the LINZ NZMS262 series 
maps in NZ Map Grid projection re-projected to NZTM
   ows_keywordlistLINZ,TOPO
   wms_opaque1
   wms_group_title Toposcans
   #wms_group_abstract Topo layers
   wms_resx 25
   wms_resy 25
   ows_extent 1073500 4734000 2102100 6224500
   END
 END
 
Cheers,
 
Robert Sanson

 MeLv1n wAuRaN death_knight0...@yahoo.com 30/01/2009 2:50 p.m. 

hi all,

right now i have 50 .TIF files (a whole map of my region) my question is, is it 
possible for mapserver to load 50 .TIF files all together as a basemap? because 
from the tutorial i read, the samples only load 1 raster file..so, i'm 
wondering if it's possible to load all the 50 TIF files to the same .MAP

if not, then how do i merge all the TIF files into a single TIF? because when i 
load them all together in ArcMap it forms a whole map.

for the information, i'm still a newbie...so i still need alot of advices from 
the experts.

thanks for your help,
Melvin




Click here ( https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg== ) to 
report this email as spam.
--
The contents of this email are confidential to AsureQuality. If you have 
received this communication in error please notify the sender immediately and 
delete the message and any attachments. The opinions expressed in this email 
are not necessarily those of AsureQuality. This message has been scanned for 
known viruses before delivery. AsureQuality supports the Unsolicited Electronic 
Messages Act 2007. If you do not wish to receive similar communications in 
future, please notify the sender of this message.
--


This message has been scanned for malware by SurfControl plc. 
www.surfcontrol.com
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users