[Xastir] Re: Bounding boxes

Curt Mills, WE7U hacker at tc.fluke.com
Mon Oct 13 18:16:23 EDT 2003


On Tue, 7 Oct 2003, Tom Russo wrote:

> Hate to drag this thread on too long, but you've tickled my interest
> with your problem, and inspired me to dig for more information than
> I'd normally bother digging for.

Good thing you dug too!  It's been too long since I've been into
that code, and you had some good info about it.


> > Doable, but not a
> > matter of just setting up an FGD file or tweaking the geotiff metadata.
>
> Turns out it was probably incorrect of me to say that Xastir wasn't
> set up to use anything but UTM projected tiff files, and while I still
> claim that "tweaking" the geotiff metadata isn't enough, "twiddling"
> the data *might* be enough. (see
> <http://catb.org/esr/jargon/html/F/frobnicate.html> for the distinction)
>
> Xastir uses the libgeotiff functions GTIFImageToPCS and
> GTIFProj4ToLatLong functions to map tiff file contents to the screen,
> and prior to that uses the GTIFGetDefn function to extract projection
> data from the geotiff metadata.  If (that's a big if) the geotiff file
> contains the correct metadata to define the projection then it could
> conceivably be the case that Xastir would read any old geotiff,
> regardless of the projection.

Be aware that the code was written exclusively to handle the case of
USGS geoTIFF DRG topo files, which have the white map collar which
needs cropping, and are in UTM projection, so they need to be
stretched a bit to make them into rectangles for our lat/long
projection.

The code should be able to be extended to handle other types of
geoTIFF files, but that just wasn't the original goal.

We should be able to handle state-plane coordinate systems and
cropped geotiff's.  It might be good to separate out the cropping
and the stretching code into separate functions, as well as the
datum translation code.  It might then be easier to extend the code
to other types of files.

I'm off doing other things in the code now, but I'd be an available
resource should someone else want to tackle this any time soon.

Another thing to keep in mind is that a couple of the developers are
working on integrating the GDAL library with Xastir.  If that
library provides all we need for other sorts of geoTIFF files, it
might be better to wait for that to get done rather than hacking on
the old code.

-- 
Curt Mills, WE7U                    hacker_NO_SPAM_ at tc.fluke.com
Senior Methods Engineer/SysAdmin
"Lotto:    A tax on people who are bad at math!"
"Windows:  Microsoft's tax on computer illiterates!" -- WE7U
"The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir mailing list