[Qgis-user] Vortex coordinates
Brent Wood
pcreso at pcreso.com
Sun Jul 27 15:50:29 PDT 2014
You can use QGIS to save your dataset as GMT (Generic Mapping Tools) format, this is a text file format with x & y coordinates for each feature.
Below is an example, the lines prefixed with "#" character contain metadata & feature attribute information, each feature is separated in the file by a ">" - you should only have one feature?
In this case each feature has an integer attribute called "id"
the first and only feature in this file has attribute data (#@D1) comprising the value "1"
it is a polygon with no holes
This is a very useful format for those needing to provide text lists of coordinates for non-gis tools (like spreadsheets). If you are using Linux (or install the grep tool for Windows, see: Grep for Windows)
you can manipulate such text files very easily, for example, under Windows you can remove all the lines starting with a # to just get the coordinate listed by opening a windows terminal & typing:
type file.gmt | grep -v "#*" > file_coords.csv
(if you use Linux I shouldn't need to explain :-)
this copies the file to the grep program, which filters any lines containing a "#" followed by other characters and writes other lines to the file "file_coords.csv". While the field separator is a space, this is easily fixed in any text editor if you require a comma, or you can use Linux commands like sed or tr to do this.
HTH,
Brent Wood
Grep for Windows
grep {whatisit}
View on gnuwin32.sourceforge.net Preview by Yahoo
# @VGMT1.0 @GPOLYGON
# @R174.141609641/174.204830925/-35.2151100415/-35.1341867981
# @Je4326
# @Jp"+proj=longlat +datum=WGS84 +no_defs "
# @Jw"GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]"
# @Nid
# @Tinteger
# FEATURE_DATA
>
# @D1
# @P
174.147173114256418 -35.134186798137137
174.204830925137514 -35.136715649491563
174.203313614324856 -35.211063879311915
174.141609641276659 -35.215110041479008
174.147173114256418 -35.134186798137137
________________________________
Subject: Re: [Qgis-user] Vortex coordinates
I've got a limited protection zone around a city witch is a poligonon
>>>
>>>and i need to know pease if its possible to make a excel sheet with the vortexes coordinates.... i kwon that with the fild calculator i can know the nr of vortices is it possible to add theur coordinates automaticly??!
>>>Thanks in advanced!!!
>>>All the best
>>>_______________________________________________
>>>Qgis-user mailing list
>>>Qgis-user at lists.osgeo.org
>>>http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140727/621d55ed/attachment.html>
More information about the Qgis-user
mailing list