[mapserver-users] Best way to do a batch reprojection (on windows)
Evans, James R Civ USAF ACC 84 RADES/SCZE
James.Evans at hill.af.mil
Mon Aug 12 15:47:08 PDT 2013
Well, the reprojection from NAD83 UTM Zone 16 to WGS84 didn't go so well.
The edges don't exactly line up so I have a one pixel gap at the upper left
hand corner, and a big gap at the lower right hand corner. So, would I have
better luck reprojecting to some other projection, or should I just leave
the data the way it is and hope that some future version of Mapserver (MS4W)
will support multiple projections in the same layer?
Thanks,
James
-----Original Message-----
From: Evans, James R Civ USAF ACC 84 RADES/SCZE
Sent: Thursday, August 08, 2013 10:40 AM
To: mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] Best way to do a batch reprojection (on
windows)
I'm using the latest released version of MS4W, not even the latest debug
builds, so that probably won't work for me. I'll see what the result is for
this first conversion. It would be nice to be able to have one contiguous
layer without having to do the reprojection.
Thanks,
James
-----Original Message-----
From: Rahkonen Jukka [mailto:jukka.rahkonen at mmmtike.fi]
Sent: Wednesday, August 07, 2013 10:38 PM
To: Evans, James R Civ USAF ACC 84 RADES/SCZE;
mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Best way to do a batch reprojection (on
windows)
Hi,
Stop what you do, it is not the right thing anymore. It should not be
necessary to reproject the images into a common projection any more. This
page describes how Mapserver is planned to be made to support tileindex with
mixed projections http://mapserver.org/development/rfc/ms-rfc-100.html and
this one proves that it has been implemented
https://github.com/mapserver/mapserver/pull/4697. I am not sure but the
development builds in http://gisinternals.com/sdk/ may include this new
feature.
Before this warping to a common coordinate system has been the way to go and
gdalwarp is for sure good tool for that. I have using it with average
resampling for aerial images. However, there is one nasty problem with
warping images one by one into a common projection and it is caused by the
rotation that results from warping. Each rotated image will have nodata
collards in the corner areas and Mapserver must make them transparent when
it is serving the final layer. It in simple, but only with uncompressed
images because effective compression methods are lossy and after compression
the nodata areas do not have just one pixel value like 0,0,0 but they have
also close values like 0,1,0 and 0,0,1 etc. and those pixels will not be
transparent.
So I would suggest you to stop what you do and start evaluting tileindex
with mixed projections. Warping images in-a-fly with Mapserver is fast and
you do not need to be afraid of that. Your WMS users won't be happy with
EPSG:4326 or any other single projection for the whole USA anyway so there
would not be any difference, they will ask reprojected images in any case.
You can start with the JPEG2000 images as they are but if you want more
speed later you can convert them without reprojecting inte tiled GeoTIFFs
with jpeg compression. Nodata problem will not occur in this case because
images are not rotated.
-Jukka Rahkonen-
________________________________________
James_in_Utah wrote:
> Hi,
> I have the NAIP imagery for CONUS, and it's rather large. About 4.2TBs,
of
JP2 files. It's projected in 10 UTM zones across the country. If I'm going
to offer a single layer with Mapserver, I think I have to reproject all of
the files into a single projection, say WGS84. I'm trying to figure out a
good way to do that. GlobalMapper seems to have this function. I loaded up
all the data from Alabama, and told it to convert the projection. It's been
working at it for about 8 hours and I see no sign of progress. I tried
creating a batch file to call GdalWarp, but for some reason that's getting
an error. Here's the line from my batch:
> for %%f in (*.jp2) do gdalwarp -t_srs EPSG:4326 %%f c:\out\%%f
> The error is saying 4326 can't be found in the GSC.CSV, even though it is
plainly in there. Even if I get this working, this wiill still be very
tedious. The data is divide up by states, and under the state directory,
there are dozens of subdirectories. I would need some sort of script to
walk through the directories.
> If anyone has a suggestion on how to efficiently reproject this large
amount
of data it would be greatly appreciated!
> Thanks,
> James
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Best-way-to-do-a-batch-reprojection-on-w
indows-tp5071365.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6912 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130812/cdfc7a26/attachment.bin>
More information about the MapServer-users
mailing list