[Xastir] Non-Fun with DRGs

Derrick J Brashear shadow at dementia.org
Wed Oct 2 03:09:21 EDT 2002


brian.heaton at janusresearch.com wrote:

> Thanks Curt.  I'm currently wget'ing the Georgia set from Georgia Tech. 
> Now if I can just find a free source of DOQQ's  for Georgia I'll be set!
> I've got a gisdatadepot account, but don't want to attempt to download
> all of them.  I may get the couple I need for my next demo and then let
> the gov't pay for the rest if they buy.

You'll be sad if you try to use them (assuming you don't create .fgd files
but instead use the geotiff tags). If you search the archives you'll find
the details. 

The patch below isn't 100% correct, but I still haven't figured out the
"right" way to do it, nor has it broken anything I've tried, so admittedly
I haven't been rushing to find said "right" answer. It's against an older
CVS version but it still applied cleanly last week.

And as to South Carolina DRGs, they can be batch-downloaded. 

Index: maps.c
===================================================================
RCS file: /cvsroot/xastir/xastir/src/maps.c,v
retrieving revision 1.110
diff -u -r1.110 maps.c
--- maps.c	3 Jul 2002 19:16:21 -0000	1.110
+++ maps.c	4 Jul 2002 01:34:59 -0000
@@ -6796,7 +6796,7 @@
      */
     if (!have_fgd)      // Not a USGS map or perhaps a newer spec
     {
-        crop_it = 0;        /* Do NOT crop this map image */
+        crop_it = 1;        /* Do NOT crop this map image */
 
         /*
          * Snag and parse ImageDescription tag here.
@@ -6893,12 +6893,41 @@
         }
         f_SE_x_bounding = (float)xxx;
         f_SE_y_bounding = (float)yyy;
+
+        if (f_NW_y_bounding > 0) {
+          yyy=((f_NW_y_bounding > f_NE_y_bounding) ? f_NE_y_bounding 
+               : f_NW_y_bounding);
+          xxx=((f_SW_y_bounding < f_SE_y_bounding) ? f_SE_y_bounding 
+               : f_SW_y_bounding);
+        } else {
+          yyy=((f_NW_y_bounding < f_NE_y_bounding) ? f_NE_y_bounding 
+               : f_NW_y_bounding);
+          xxx=((f_SW_y_bounding > f_SE_y_bounding) ? f_SE_y_bounding
+               : f_SW_y_bounding);
+        }
+        f_north_bounding = (float)yyy;
+        f_south_bounding = (float)xxx;
+        if (f_NE_x_bounding > 0) {
+          xxx=((f_NE_x_bounding < f_SE_x_bounding) ? f_SE_x_bounding 
+               : f_NE_x_bounding);
+          yyy=((f_NW_x_bounding > f_SW_x_bounding) ? f_SW_x_bounding 
+               : f_NW_x_bounding);
+        } else {
+          xxx=((f_NE_x_bounding > f_SE_x_bounding) ? f_SE_x_bounding 
+               : f_NE_x_bounding);
+          yyy=((f_NW_x_bounding < f_SW_x_bounding) ? f_SW_x_bounding 
+               : f_NW_x_bounding);
+        }
+        f_west_bounding = (float)yyy;
+        f_east_bounding = (float)xxx;
     }
 
+#if 0
     // Handle special USGS geoTIFF case here.  We only have
     // four boundaries because the edges are aligned with
     // lat/long.
     else    // have_fgd
+#endif
     {
         f_NW_x_bounding = f_west_bounding;
         f_NW_y_bounding = f_north_bounding;





More information about the Xastir mailing list