[GRASSLIST:339] Re: Question about re-projecting points imported
from Postgres
Thomas Adams
Thomas.Adams at noaa.gov
Thu Mar 23 10:19:05 EST 2006
David,
I finally have reached some resolution on this, albeit maybe somewhat
unsatisfactory…
Your suggestion to export to a CSV file and re-import worked, but not
with the GRASS 6.1CVS version dated 03March2006. That is, v.in.ascii
failed to import this data; however, using the GRASS 6.0.2 stable
version worked. In fact, re-projecting the data I imported from Postgres
into my LCC location from my lat-long location worked perfectly with
GRASS 6.0.2, but I could not get the GRASS 6.1CVS version dated
03March2006 to do this.
I hate doing this, because there are many GOOD things with GRASS 6.1,
but I am having to drop back to GRASS 6.0.2 for many of my applications.
I must be able to import lat-long point data and re-project it into a
LCC location.
Thanks for your help!
Regards,
Tom
David Finlayson wrote:
> If I understand you correctly, you have a table in Postgres that
> happens to contain x, y coordinates in addition to other attributes
> but is not a PostGIS layer. You were able to convert the X,Y points
> into a GRASS vector file (points) using v.in.db AND this new vector
> file seems to work in the lat long Location.
>
> Now when you try to project the new vector file into a LCC location it
> fails. What is the error you are getting? That seems like it should
> work.
>
> As a test, have you tried exporting the postgres table as a csv file
> (at least pointid, x and y) and then load the vector with v.in.ascii?
> You will be able to link the ID, X,Y CSV file back to the original
> postgres attribute table using the ID column. Does this simple vector
> file project?
>
> David
>
> On 3/16/06, Thomas Adams <Thomas.Adams at noaa.gov> wrote:
>
>> David,
>>
>> Maybe you don't understand. The Postgres table is for points and has the
>> lat-long location; using v.in.db one is required to identify the x,y
>> location. The additional attributes are read as well, of course. I can
>> successfully import the Postgres table into GRASS into my lat-long
>> location. If I then try to re-project the points into a LCC projection
>> (from the LCC location), the v.proj does not seem to work. Is this what
>> you previously understood I was tying to do or do now?
>>
>> Who would know whether or not this can be done?
>>
>> Thanks for you r responses…
>>
>> Tom
>>
>> David Finlayson wrote:
>>
>>> Ah, I understand now. I'm afraid I can't help you with this. I've only
>>> used databases to hold attribute information not the topology also. I
>>> haven't tried PostGIS yet.
>>>
>>> David
>>>
>>> On 3/15/06, Thomas Adams <Thomas.Adams at noaa.gov> wrote:
>>>
>>>
>>>> List:
>>>>
>>>> I have a Lat-Long location into which I have successfully imported
>>>> points from Postgres (a further question about this further below). What
>>>> I want to do is to re-project the points into a Lambert Conic Conformal
>>>> location using v.proj. When I try to do this, it does not work — it
>>>> seems as though GRASS does not know how to do this. I have been able to
>>>> do this successfully with points imported using v.in.ascii. It seems I
>>>> am missing something, either conceptually or procedurally…
>>>>
>>>> The further question about using v.in.db, the 'key' parameter in the
>>>> documentation claims this is a string, which makes since to me, but when
>>>> v.in.db is run, GRASS complains that an integer is needed. I'm guessing
>>>> the integer that's supplied is the column/field number (beginning with
>>>> '1'); if true, this seems to be inconsistent by what the 'x', 'y', and
>>>> 'z' fields require — just a thought.
>>>>
>>>> Tom
>>>>
>>>> --
>>>> Thomas E Adams
>>>> National Weather Service
>>>> Ohio River Forecast Center
>>>> 1901 South State Route 134
>>>> Wilmington, OH 45177
>>>>
>>>> EMAIL: thomas.adams at noaa.gov
>>>>
>>>> VOICE: 937-383-0528
>>>> FAX: 937-383-0033
>>>>
>>>>
>>>>
>>>>
>>> --
>>> David Finlayson
>>>
>>>
>> --
>> Thomas E Adams
>> National Weather Service
>> Ohio River Forecast Center
>> 1901 South State Route 134
>> Wilmington, OH 45177
>>
>> EMAIL: thomas.adams at noaa.gov
>>
>> VOICE: 937-383-0528
>> FAX: 937-383-0033
>>
>>
>>
>
>
> --
> David Finlayson
>
>
>
--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177
EMAIL: thomas.adams at noaa.gov
VOICE: 937-383-0528
FAX: 937-383-0033
More information about the grass-user
mailing list