[Xastir] Non-Fun with DRGs

Brian Heaton brian.heaton at janusresearch.com
Wed Oct 2 10:10:24 EDT 2002


Derrick,

	Yep, I'm using fgd's with them.  I went back through the archives and
read all the gory details before I started. I've done it using the
metadata that comes with them and using the script to create the fgd's. 
Either way works great for me. I appear to have pretty good registration
right now.  I've got excellent alignment at map edges (ie - the roads
join well).

	I've figured out how to batch download all the SC DRG's.  Unfortunately
the source I've found (the DNR GIS page) uses the quad names rather than
the lat/lon based naming scheme.  This means I've got to manually go
through all of them and tweak the metadata to make them work well. I
think I'll save that evolution for when I've got some more time to
tinker with them.

			73/N5VFF


On Wed, 2002-10-02 at 03:09, Derrick J Brashear wrote:
> 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;
> 
> 
> 
> _______________________________________________
> Xastir mailing list
> Xastir at krypton.hscs.virginia.edu
> http://krypton.hscs.virginia.edu/mailman/listinfo/xastir
-- 
------------------------------------------------------------------
Brian D Heaton
Senior Network Engineer
Janus Research Group
(706) 364-9100 x336
PGP Key Available



More information about the Xastir mailing list