Re: inverse mapproject -C confusion
Joaquim Luis <[email protected]>
| Newsgroups | gmane.comp.gis.gmt.user |
|---|---|
| Message-ID | <[email protected]> |
Jason, How were your x,y (cartesian) coordinates obtained? What you need to do is to inverse project using the same projection used to by x,y in first place. mapproject -I -Jm... inverse project coordinates that are in Mercator projection, not any km(etric) units Joaquim > Hi, > > I'm trying to convert a table of x and y coordinates in km to > geographic coordinates using mapproject -I. My grid of points is > centered at W122 N38 (0,0). If I use an Azimuthal Equidistance > projection with the -C option, (0,0) in km projects to (-122,38) as I > expected. When I try a Mercator projection with the -C option, x > projects to -122 but y is projected to 0 degrees latitude. I have to > exclude the -C option and adjust the Range so that the lower left > corner is where I want the center of the grid (-122,38). > > Inverse projection (expect: 0,0 km --> -122,38 degrees) > > $ echo 0 0 | mapproject -I -Fk -C -Je-122/38/1:1 -R-123.5/-120.5/36.5/39.5 > > -122 38 > > $ echo 0 0 | mapproject -I -Fk -C -Jm-122/38/1:1 -R-123.5/-120.5/36.5/39.5 > > -122 0 > > $ echo 0 0 | mapproject -I -Fk -Jm-122/38/1:1 -R-123.5/-120.5/36.5/39.5 > > -123.5 36.5 > > $ echo 0 0 | mapproject -I -Fk -Jm-122/38/1:1 -R_-122_/-120.5/_38_/39.5 > > -122 38 > > The forward projection behaves similarly (expect: -122,38 degrees --> > 0,0 km): > > $ echo -122 38 | mapproject -Fk -C -Je-122/38/1:1 > -R-123.5/-120.5/36.5/39.5 > > 0 0 > > ... > > $ echo -122 38 | mapproject -Fk -Jm-122/38/1:1 > -R_-122_/-120.5/_38_/39.5 > > 00 > > Am I using the -C (or --Fk, -J, -R,) option incorrectly, or > misunderstanding the projections (or making a poor choice)? Is there a > better way to create a geographic grid with 1 km spacing? > > I'm using GMT 5.1.1_r12604 on a virtual Ubuntu machine -- I'm visiting > another office and haven't managed to navigate svn through their proxy > to update. > > I'm ultimately trying to create a 100x100 km grid of points with 1 km > spacing in geographic coordinates for use in a seismic hazard > calculation, and will eventually calculate rate, beta, and cell area > (in units of equatorial square degrees) at each point. I started by > generating the x,y table with awk/perl. > > Thanks for your help, > > Jason > > *Jason Altekruse* > > Project Geologist > > *Fugro Consultants, Inc.* > > Lakewood, CO 80401 > > To unsubscribe, send the message "signoff gmt-help" to > [email protected] To unsubscribe, send the message "signoff gmt-help" to [email protected]