[GRASSLIST:9486] Re: projection of vector points from v.in.ascii
Luigi Ponti
lponti at infinito.it
Wed Dec 14 18:00:12 EST 2005
Thanks Amish,
I gave it a try but cs2cs does not seem to be able to process the entire
table with coordinates and point values.
What I am trying to do is to automate the commands I have used to
process the ascii output file of the population model (i.e., import,
reproject, interpolate, clip, drape over a shaded relief, etc.) by using
a script. I am missing some steps:
- How can I switch between locations with a shell script (so far I am
able to start grass with the correct location/mapset: not much)?
- Is it better to run the script from the bash/cygwin shell or from the
grass shell?
- Is there a general approach to GRASS scripts and where should look for
reference?
Thanks,
Luigi
Hamish wrote:
>>The ascii file with Lat/Long that I used via v.in.ascii to produce the
>>interpolated raster, needs to be first imported to a LatLong location
>>and then reprojected to the Lambert Conformal Conic/NAD83 location
>>where I have map files. Is this right?
>
>
> yes, after importing into the LL location, restart in the LCC/83
> location and run v.proj.
>
>
>
>>Should I be able to import a vector with latitude and longitude to any
>>location or not?
>
>
> Only via v.proj, not directly..
>
> But you can pass it through PROJ4's cs2cs first. see the $IN_PROJ,
> $OUT_PROJ, and cs2cs bits in the v.in.garmin script; ie (generally) to
> go from WGS84 lon/lat to current projection:
>
> IN_PROJ="+proj=longlat +towgs84=0.000,0.000,0.000"
> OUT_PROJ="`g.proj -jf`"
>
> cs2cs -f %.7f $IN_PROJ +to $OUT_PROJ < infile.txt > outfile.txt
>
>
> If source projection is not LL/WGS84, use g.proj to get correct input
> string.
>
> cs2cs is probably already installed on your system.
>
>
> Hamish
>
>
More information about the grass-user
mailing list