[GPlates-discuss] Conversion of text data for plotting lines and points

John Cannon john.cannon at sydney.edu.au
Tue Nov 26 13:47:03 AEDT 2019


Hi Genti,

The Python errors are probably because you're using Python 2.5 (which is very old).  Currently you'll need Python 2.7 (which is the latest Python 2 version) and next year we'll support Python 3 also.

For (1), Christian's suggestion is definitely easiest (changing ".dat" to ".gmt" and load into GPlates).  [And Bruce and Christian's advice to use a standard GIS.]

For (2), you can use "convert_xy_to_gplates.py" with the "-s" option to create a GPML coverage (eg, lat/lon/depth) for display in GPlates.

Regards,
John

-----Original Message-----
From: GPlates-discuss <gplates-discuss-bounces at mailman.sydney.edu.au> On Behalf Of Christian.Heine at shell.com
Sent: Tuesday, 26 November 2019 3:19 AM
To: gplates-discuss at mailman.sydney.edu.au
Subject: Re: [GPlates-discuss] Conversion of text data for plotting lines and points

Hi Genti,

attached your coastline file as gpmlz as demo that this can be done relatively easily. After changing your file suffix from dat to gmt I simply dropped the file into GPlates' main window and saved it out as gplmz.

I'd second Bruce - suggesting you use any of the available GIS packages (such as the freely available https://protect-au.mimecast.com/s/ZQh8Cp8AJQtr6PwDuP_wLU?domain=qgis.org) to work with your data in a proper geospatial context and project/format your data so that you can work more easily with GPlates. Using Geopackage or Shapefile will make your life a lot easier. 

Christian


> -----Original Message-----
> From: GPlates-discuss <gplates-discuss-bounces at mailman.sydney.edu.au> 
> On Behalf Of Eglington, Bruce
> Sent: Monday, 25 November 2019 4:42 PM
> To: GPlates general discussion mailing list <gplates- 
> discuss at mailman.sydney.edu.au>
> Subject: Re: [GPlates-discuss] Conversion of text data for plotting 
> lines and points
> 
> THINK SECURE. This email has come from an external source. Do not 
> click on links or open attachments unless you recognise the sender.
> 
> Hi
>   Do you use any of the standard GIS software packages? If so, the 
> easiest way to achieve what you want (since you already know GIS), is 
> to create shapefiles for your features. Then you just import the 
> shapefile to GPlates and join to the plate polygons in your rotation setup.
> 
> Bruce
> 
> 
> Bruce Eglington (Ph.D.)
> Murray Pyke Chair
> 
> Geological Sciences
> 114 Science Place
> Saskatoon
> Saskatchewan
> S7N 5E2
> Canada
> 
> bruce.eglington at usask.ca
> Ph: +1-306-966-5732
> 
> 
> 
> -----Original Message-----
> From: GPlates-discuss <gplates-discuss-bounces at mailman.sydney.edu.au> 
> On Behalf Of Genti Toyokuni
> Sent: Monday, November 25, 2019 09:35
> To: GPlates general discussion mailing list <gplates- 
> discuss at mailman.sydney.edu.au>
> Subject: Re: [GPlates-discuss] Conversion of text data for plotting 
> lines and points
> 
> CAUTION: This email originated from outside of the University of 
> Saskatchewan. Do not click links or open attachments unless you 
> recognize the sender and know the content is safe. If in doubt, please 
> forward suspicious emails to phishing at usask.ca
> 
> 
> Dear John and Christian,
> 
> Thank you very much for letting me know several ways to solve this 
> problem.
> First I tried to run "convert_xy_to_gplates.py". However I received 
> several syntax errors, which may be due to difference in version of 
> Python in my environment.
> (I am using Python 2.5.4 in Vine Linux. I should run your programs in 
> Python 3.x)
> 
> Second I tried to open my data files directly in GPlates but it also 
> showed many errors.
> 
> The attached files are as follows:
> coast-eclip.dat: Coastline data (lon, lat) in the ecliptic coordinates 
> which was chosen for the central Greenland to be at (lon=90deg, 
> lat=0deg).
> volcano_lonlat_eclip.dat: Location of volcanoes (lon, lat) in the same 
> coordinates.
> 
> If you have time, would you please confirm that you can convert these 
> files into "gpmlz" format?
> 
> Best wishes,
> 
> Genti Toyokuni
> 
> 
> 2019年11月25日(月) 14:06 John Cannon <john.cannon at sydney.edu.au>:
> 
> >
> > Hi Genti,
> >
> > There's an existing pyGPlates script to do both these things.  I've
> just uploaded it to PlateTectonicTools:
> >
> > https://protect-au.mimecast.com/s/haZACq7BKYtAwG2WtX5Pi5?domain=eur02.safelinks.protection.outlook.com
> > 2.safelinks.protection.outlook.com
> > https://protect-au.mimecast.com/s/wmTACr8DLRtKJXm9C4HriQ?domain=ub.com
> > om
> > &data=02%7C01%7Cchristian.heine%40shell.com%7C4585fd098c914e085e
> > 74
> > 08d771be28c7%7Cdb1e96a8a3da442a930b235cac24cd5c%7C0%7C1%7C6371029338
> > 70 
> > 213930&sdata=UN6u16PU5p3tjIStTVxdRjnaIcLiXaY7EPHDAXnYRug%3D&
> > re
> > served=0
> > t_xy_to_gplates.py
> >
> > It works on its own, so if you want you can just copy it from there
> instead of installing the entire package (eg, hit 'raw' and 
> copy'n'paste
> - sorry I'm not very experienced with Git).
> >
> >
> > To see the options run:
> >
> >     python convert_xy_to_gplates.py --help
> >
> > ...and you'll also see some examples of what the script does.
> >
> >
> > For your second point, you can use the "-s" option (eg, "-s depth")
> and then the third column of your XY file (depth) will then show up in 
> GPlates (once you've loaded the generated GPML file) as a separate 
> colour on each point (that you can then configure with colour palettes).
> >
> >
> > Before running the script, you'll need to install pyGPlates (and it
> currently only works with Python 2.7, though next year will also 
> support Python 3):
> > https://protect-au.mimecast.com/s/V6eXCvl0PoCmVolXtAm7Ub?domain=eur02.safelinks.protection.outlook.com
> > 2.safelinks.protection.outlook.com
> > https://protect-au.mimecast.com/s/suDxCwVLQmiMrXNpH1xKks?domain=plates.org
> > es.org &data=02%7C01%7Cchristia
> > n.heine%40shell.com%7C4585fd098c914e085e7408d771be28c7%7Cdb1e96a8a3d
> > a4
> > 42a930b235cac24cd5c%7C0%7C1%7C637102933870213930&sdata=ktXFFT4uv
> > %2
> > FHhTQln7L%2B2J2Vy%2BqLQ7pKhuTNX8fiGkiM%3D&reserved=0
> >
> > Regards,
> > John
> >
> > -----Original Message-----
> > From: GPlates-discuss 
> > <gplates-discuss-bounces at mailman.sydney.edu.au>
> > On Behalf Of Genti Toyokuni
> > Sent: Monday, 25 November 2019 3:33 PM
> > To: gplates-discuss at mailman.sydney.edu.au
> > Subject: [GPlates-discuss] Conversion of text data for plotting 
> > lines and points
> >
> > Dear Sirs;
> >
> > Thank you very much for providing us a great software!
> > I want to ask you the following two points:
> >
> > (1) How can I convert a simple text list of longitudes and latitudes
> including a ">" sign as a line separator, which is commonly used in 
> Generic Mapping Tools, into "gpmlz" format? I want to plot several 
> lines specified by the list on the Earth's surface.
> >
> > (2) How can I convert a simple text list of longitudes, latitudes, 
> > and
> depths showing locations of volcanoes, hotspots, and hypocenters into 
> a file format which can be opend by GPlates?
> >
> > I am sorry for my very basic questions.
> >
> > Best wishes,
> >
> > Genti Toyokuni
> >
> > _______________________________________________
> > GPlates-discuss mailing list
> > GPlates-discuss at mailman.sydney.edu.au
> > https://protect-au.mimecast.com/s/2ELhCxnMRvt6NKXOtWmQ9p?domain=eur02.safelinks.protection.outlook.com
> > 2.safelinks.protection.outlook.com
> > man.sydney.edu.au%2Fmailman%2Flistinfo%2Fgplates-discuss&data=02
> > %7
> > C01%7Cchristian.heine%40shell.com%7C4585fd098c914e085e7408d771be28c7
> > %7 
> > Cdb1e96a8a3da442a930b235cac24cd5c%7C0%7C1%7C637102933870213930&s
> > da
> > ta=JW0l0NzPqfVFxkzQOznN7jwyMAvZ2Tq4gV1%2BbqsXhWw%3D&reserved=0
> >
> > _______________________________________________
> > GPlates-discuss mailing list
> > GPlates-discuss at mailman.sydney.edu.au
> > https://protect-au.mimecast.com/s/2ELhCxnMRvt6NKXOtWmQ9p?domain=eur02.safelinks.protection.outlook.com
> > 2.safelinks.protection.outlook.com
> > man.sydney.edu.au%2Fmailman%2Flistinfo%2Fgplates-discuss&data=02
> > %7
> > C01%7Cchristian.heine%40shell.com%7C4585fd098c914e085e7408d771be28c7
> > %7 
> > Cdb1e96a8a3da442a930b235cac24cd5c%7C0%7C1%7C637102933870213930&s
> > da
> > ta=JW0l0NzPqfVFxkzQOznN7jwyMAvZ2Tq4gV1%2BbqsXhWw%3D&reserved=0
> >
> _______________________________________________
> GPlates-discuss mailing list
> GPlates-discuss at mailman.sydney.edu.au
> https://protect-au.mimecast.com/s/CEA-CyoNVrcvVE4nIPufUC?domain=eur02.safelinks.protection.outlook.com.
> safelinks.protection.outlook.com
> n.sydney.edu.au%2Fmailman%2Flistinfo%2Fgplates-
> discuss&data=02%7C01%7Cchristian.heine%40shell.com%7C4585fd098c914
> e0
> 85e7408d771be28c7%7Cdb1e96a8a3da442a930b235cac24cd5c%7C0%7C1%7C6371029
> 33 
> 870213930&sdata=JW0l0NzPqfVFxkzQOznN7jwyMAvZ2Tq4gV1%2BbqsXhWw%3D&a
> mp
> ;reserved=0



More information about the GPlates-discuss mailing list