[GRASSLIST:10053] Re: projection problems

Tom Russo russo at bogodyn.org
Mon Jan 30 13:27:27 EST 2006


On Mon, Jan 30, 2006 at 12:12:23PM -0600, we recorded a bogon-computron collision of the <kwythers at umn.edu> flavor, containing:
> 
> On Jan 30, 2006, at 10:05 AM, Tom Russo wrote:
> 
> 
> >
> 
> Now here is what I think is going on with these damn files... tell me  
> if this makes sense to you. The coordinates in the .shp file from the  
> state are correct. This is why if I read the files in with v.in.ogr,  
> they can be displayed with d.vect on top of an outline of the state  
> is all looks fine. However, the y coordinates in the attribute file  
> (which come from the dbf file that came with the .shp file from the  
> state), are all messed up by some 4,700,206, plus or minus 0.5 (for  
> god knows what reason).

Ah!  I understand now.  The *attributes* of the points in the data file
have x and y columns, and those are weird.  *sigh*

> Here is what I'm wondering... if the .shp file has the correct  
> geography coordinates, is there some command that out write out those  
> coordinates? If so, I could substitute the good y coordinates for the  
> bad y coordinates in the attribute table. I assume if I use  
> v.out.ogr, that just writes the attributes from the attribute table  
> (including the weird y coordinates). true?

Yes, v.in.ogr is just taking the .dbf file's columns and importing them 
into your postgresql database.  

I am not really familiar with all the tricks in GRASS's db bag of tricks.
There is almost certainly some way to do it using db.execute, but you'll
have to get help from one of the folks on the GRASSLIST that actually knows
that stuff cold.  It seems, though, that there must be a way for you to do
what you're trying to do using the non-geometry fields of the DB and the 
good geometry data from the vectors, wihtout monkeying with the X and Y columns
of the attribute data.

-- 
Tom Russo    KM5VY     SAR502  DM64ux         http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 
 "The only thing you can do easily is be wrong, and that's hardly
  worth the effort." -- Norton Juster




More information about the grass-user mailing list