[mapserver-users] Geo-Referencing questions
Frank Warmerdam
warmerdam at pobox.com
Fri Jul 17 14:23:05 PDT 2009
Rebecca Maurer wrote:
> I was sort of skeptical that this could actually make it a
> geo-referenced TIFF file, so I called gdalinfo on it and got:
...
> Corner Coordinates:
> Upper Left ( -87.6076061, 41.8096513) ( 87d36'27.38"W, 41d48'34.74"N)
> Lower Left ( -87.6077441, 41.7830279) ( 87d36'27.88"W, 41d46'58.90"N)
> Upper Right ( -87.5790865, 41.8100965) ( 87d34'44.71"W, 41d48'36.35"N)
> Lower Right ( -87.5792245, 41.7834731) ( 87d34'45.21"W, 41d47'0.50"N)
> Center ( -87.5934153, 41.7965622) ( 87d35'36.30"W, 41d47'47.62"N)
...
> First of all -- what are the differences between the two different sets
> of coordinates in parentheses for "upper left/ lower left.....etc".
Rebecca,
The first set is reported in decimal degrees. The second set is the
same values described in degrees, minutes and seconds with hemisphere
codes (W=west vs. using a negative sign for instance). The values
all look plausible.
> Next, is this actually a GeoTiff?
It appears to be a valid geotiff though if the details of this
were particularly important to you it might be better to inspect a
listgeo report instead of a gdalinfo report.
> And moreover, what do I do with it
> now? I tried displaying it as
>
> LAYER
> NAME "campusmap"
> TYPE RASTER
> STATUS ON
> DATA "TrialCampusMap.tif"
> CLASSITEM "[pixel]"
I have no idea why you are using CLASSITEM. Normally RGB images would
be used directly with no classes or classitem defined in the raster layer.
> with a GeoTiff OUTPUTFORMAT and also with different types of files as
> IMAGETYPE. But each time, the image came out as horrible quality,
I would encourage you to use an output format like PNG24 or JPEG
to avoid significant color degredation. PNG or GIF will generally
be inappropriate choice for RGB imagery.
> and
> oddly tilted (though it might be tilted so that the latitude line is the
> horizontal axis?).
The photo is apparently not oriented north up, so MapServer is
rectifying it on the fly. Based on the geotransform it seems the
angle of rotation should be modest - perhaps a few degrees?
> Also, I wasn't sure what to use for the EXTENT, and
> used the numbers -87.60 41.75 -87.57 41.81 which seemed to display the
> whole map, but this was only after some trial and error with the
> upperleft/lowerleft, etc. data. How can I normally find the EXTENT?
Normally you could find this by looking at the corner coordinates
in the gdalinfo report.
> Second of all - I want to start adding some Vector layers, but the
> problem is that no shapefiles or anything exist for the data I want to
> add. I googled about a bit, but didn't find any good advice on how to
> make your own Vector data from personal knowledge. Can anybody point me
> in the right direction on this?
My suggestion would be to draw them by hand over the photo image you
have using software like QGIS for instance. Ensure that whatever
software you use understands rotated geotiff files - this is not
universal.
If you want predefined local data you might want to discuss
data sources with your campus engineering office, or your local
city/municiple GIS people.
Good luck,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list