When writing to theGPS eXchange Format (GPX)format,certain attribute names need to be set using the schema in thedocumentation.Using the correct schema format ensures that the attributes are written correctly and the data you require while you are in the field is available.It is important to note that data written to the GPX format will be automatically reprojected in the writer to decimal degrees (WGS84 datum) which is the EPSG:4326 coordinate system.For information how to read GPX data,see theReading GPX Dataarticle.
When adding a GPX Writer to the canvas,six feature types are available to write to that each have their own purpose.
Metadata:The metadata contains the details about the author and copyright information
WayPoint:Particular points along a route,when following a GPS route these are the main points you would pass over.
Route:The intended path of travel
Route Point:Points along the path of travel,there may be more route points than waypoints.
Track:While in the field this is the path of actual travel
Track Point:The points along the track while following the waypoints.
In this scenario,you work for a power company,and you have been asked to create a GPS route for the field technician to walk the transmission lines after a massive wind storm on Salt Spring Island,British Columbia.The field technician will take the data that has been written into GPX format and input it into their GPS device.You have the data in Shapefile format,but the attributes will need to be cleaned up before writing out to GPX.
1.Open FME Workbench
In a blank FME Workbench canvas,add aShapefilereader.In the reader parameters,set the Dataset to Transformers.shp,this is the file containing the power poles of interest along the route.
Transformers.shp viewed in the FME Data Inspector.Background map tiles byStamen Design,underCC BY 3.0.Data byOpenStreetMap,underODbL.
Next,add another Shapefile reader,and read in the PowerLines.shp,this is the file containing the power lines that connect to the power poles.The power lines in this file have been generalized so that there is only one line instead of four.
PowerLines.shp viewed in the FME Data Inspector.Background map tiles byStamen Design,underCC BY 3.0.Data byOpenStreetMap,underODbL.
2.Create WayPoint Attributes
现在数据被读取,we can now prepare the attributes before writing out the data.When working with data to write out to GPX,it is important to have thedocumentationopen so that you can refer to the attribute naming schema.To set the waypoint attributes,add anAttributeManagertransformer to the canvas and connect it to the Transformers Shapefile feature type.In the AttributeManger parameters,set the following attribute names:
Input Attribute |
Output Attribute |
ID |
name |
OWNER |
source |
DATE_INSP |
creation_time |
CONDITION |
comment |
3.Add GPX Writer
Add aGPS eXchange Format (GPX)writer to the canvas,name the file WindStormPath.gpx and click ok.When the Select Feature Types dialog appears,select all and click ok.
Connect AttributeManager to the WayPoint feature type.
Transformers AttributeManager connected to the WayPoint feature type from the GPX writer.
4.Create Route Attributes
Next,we will create the Route attributes.Add another AttributeManager to the canvas and connect it to the PowerLines feature type.In the parameters,set the following attribute names:
Input Attribute |
Output Attribute |
CIRC_DESC |
name |
OWNER |
source |
TRNSMSS_ID |
route_id |
The rest of the attributes can be removed.(SOURCE_DT,VOLTAGE,ANNO_CAD,OBJECTID,FEAT_LEN)
Now connect the AttributeManager_2 to the Route feature type.
PowerLines AttributeManager connected to the Route feature type from the GPX writer.
5.Create Metadata
At this point,the workspace can be run,and the GPX file can be handed off.However,the GIS department at the power company is rather large.It will be a good idea to set the metadata on the GPX file so that the field technician will know who to talk to if something isn't correct or they would like something changed.
First,we will want to set the date for when this data is created.Add aCreatortransformer,then add aDateTimeStampertransformer to the canvas.在DateTimeStamper参数,set the Type to Date and click ok.Next,add aDateTimeConverterand connect it to the DateTimeStamper.We will use the DateTimeConverter to make the date match the ISO standard.In the parameters,set the output format to:
%Y-%m-%d (ISO Date)
Now to set the attributes,add anAttributeCreatorto the canvas,and connect it to the DateTimeConverter.In the parameters set the following:
New Attribute |
Attribute Value |
name |
John Smith (or your name) |
description |
For line inspection after 10/10/2018 wind storm |
creation_time |
_timestamp |
author_email |
example@example.com(or your email) |
For creation_time,_timestamp is the attribute that was created with the DateTimeConverter
Finally,connect the AttributeCreator to the Metadata feature type.
Metadata attributes created and connected to the Metadata feature type from the GPX writer.
6.Run the Workspace
For this scenario,we are only using the Waypoint,Route,and Metadata feature types,the other three feature types can be deleted if desired (RoutePoint,Track,and TrackPoint).
Run the workspace,and inspect the outputs,ensure that you have attribute values for each of the attributes set above.If some attributes are missing that were intentionally set,double check capitalization and spelling as this writer relies on the correct schema.
Output WindStormPath.gpx viewed in the FME Data Inspector.Background map tiles byStamen Design,underCC BY 3.0.Data byOpenStreetMap,underODbL.
Data Attribution
Power line data fromData BC- British Columbia Government
Power pole data randomly generated
Many GPS devices offer the option to export data toGPS eXchange format (GPX).This XML-based format can be easily read using FME.In this tutorial,we will take GPS waypoints that were acquired using an Android mobile phone and a free app calledRamblr.The waypoints were collected while hiking around Kerið Crater in Iceland,but the user forgot to turn their GPS off before driving back to their accommodation.Using FME,我们将在出口GPX读数据,clean it up and then write it out to KML.For information on how to write to GPX,see theWriting GPX Dataarticle.
When adding a GPX Reader to the canvas,six feature types are available to read from that each have their own purpose.
Metadata:The metadata contains the details about the author and copyright information
Waypoints:Particular points along a route,when following a GPS route these are the main points you would pass over.
Route:The intended path of travel
Route Points:Points along the path of travel,there may be more route points than waypoints.
Track:While in the field this is the path of actual travel
Track Points:The points along the track while following the waypoints.
The data has been exported from theRamblrapp in GPX format.The GPX data can be downloaded above.
1.Open FME Workbench
In a blank FME workspace,add aGPS eXchange Format (GPX)reader to the canvas.For the dataset select CraterHike.gpx,then set the Coord.System to LL84.We can assume that this is the correct coordinate system because while the data was being collected,it was displayed on aGoogle Map,which uses a latitude-longitude coordinate system.Click OK.In the Select Feature Types window,only select TrackPoint.We don't need the Track because we will recreate it using the cleaned up points.
GPX Reader,set the Coord.System parameter to LL84
2.Inspect the Data
Once the TrackPoints have been added to the canvas,inspect the data in the FME Data Inspector.We need to determine where the hike ended,and the drive home began.Add a Background Map to help visualize the area.You can useStamen Maps,but you will need to zoom out a bit to have the map render.UseMapbox(which is free with an account) or any other mapping service to use a satellite background map.
Area of hike indicated by red circle.Background map provided byMapbox,using a free API.
Once the background map has been set up,zoom into the points on the right side,this is where the hike took place.We will use the car in the parking lot as the endpoint,which is 46 for track_segment_point_index.
End of hike indicated by blue circle and arrow.Background map provided byMapbox,using a free API.
3.Test For Trail
Back in FME Workbench,add aTestertransformer after the TrackPoint feature type.In the Tester parameters,set the test to track_segement_point_index < 47,this way we will only keep the points 0-46,which is the hike.Anything after 46 is the drive back to the hotel.
Tester parameters,track_segment_point_index < 47
4.Create Line from Points
Now that we have determined which section is the hike,add aLineBuildertransformer to the canvas and connect it to the Passed output port on the Tester.The LineBuilder default parameters will work for this example.
5.Clean up Attributes
The GPS creates several attributes that aren't needed for our final output.Add anAttributeKeepertransformer and connect to the Line output port on the LineBuilder.In the parameters select the following parameters to keep:
track_id
track_segment_point_index
elevation
Creation_time
5.Run the Workspace
EnableFeature Cachingby going to Run > Enable Feature Caching then run the workspace,then run the translation and view the Line output in the FME Data Inspector.You should now have a line connecting all of the points for only the hike around the crater.
Feature caching enabled,view the AttributeKeeper cache.
AttributeKeeper cache viewed in the FME Data Inspector.Background map provided byMapbox,using a free API.
6.Write out to KML
The purpose of collecting this hike was to share it with people.Add aGoogle KMLwriter to the canvas and connect it to the Line output port on the LineBuilder.You can add aKMLStylerbefore the Google KML writer if you want to customize the line type or color.Run the workspace again,then open up the output file inGoogle Earth.This file can now be shared and easily viewed by others.
Final output viewed inGoogle Earth.Note,a KMLStyler transformer was not used in this output image.
Data Attribution
Data collected by Liz Sanderson usingRamblr
Global Positioning System (GPS) is a satellite-based navigation system that uses a receiver and four or more satellites to determine position anywhere on earth.The termGPSused to refer to only the United States satellite system which is part of the GNSS (Global Navigation Satellite System) but has become interchangeable with satellite navigation systems from other countries.These are the satellite navigation systems provided by each country:GNSS(North America),GLONASS(Russia),Galileo(European Union),BeiDou(China),NAVIC(India),andQuasi-Zenith(Japan).Note that this article uses GPS to refer to the GNSS satellites,your GPS device might be able to use the other systems,consult your device's documentation for more information.
Knowing your location or the location of your asset is vital.By using a GPS device receiver and satellites,the location is determined accurately (exact accuracy measurements can vary significantly between device brands).Collecting the data is the easy part,being able to use the data in a meaningful way is where things become tricky,that's where FME comes in.
There are three main ways FME can interact with GPS data.The first way is to directly read in the GPS data using brand-specific format readers like Trimble,Garmin or ArcPad.The second way is to export the data from your GPS device in a generic GPX,KML,XML or CSV format and then read it into FME.第三种方法是连接到你的设备的API。This article will discuss all three methods and provide additional resources to learn more.
Depending on which brand of GPS device you are trying to read data from,a free plugin calledGPSBabelmay need to be installed first.GPSBabel is a free,open-source plugin that works with any operating system.Once it is installed,after FME is restarted,the formats will be available to use.If you are having issues with FME and GPSBabel,contact亚搏在线Safe Software Support.Consult the documentation for your specific brand of GPS to determine how to export the data.FME can also write out to all the formats listed below unless otherwise indicated.
Formats that can be read directly into FME:
Esri ArcPad Exchange(requires theFME Data Interoperability Extension)
TrimbleJob XML (Reader only)
Formats that requireGPSBabel:
DeLorme GPS (Reader only)
NMEA GPS (Reader only)
一些GPS设备或移动应用程序可以导出GPX,KML or XML data,which can then be read into FME using the corresponding readers.FME can also write out to these formats which can then be imported into your device (if available on the device).For more information on how to do this see the following tutorials:
Tutorial: Getting Started with KML
How to Convert KML to Shapefile|How to Convert Shapefile to KML
Tutorial: Getting Started with XML
Tutorial: Getting Started with CSV
Build Road Lines from GPS Points (CSV to Shape)
Besides being able to export the data to a file,some GPS's have an API that allows you to retrieve the data via an internet connected device.Using FME and the HTTPCaller transformer,these API's can be read in and manipulated.To learn how to use an API in FME,see the following tutorials:
The following is the list of API enabled GPS devices that our customers have used,please your device's documentation to learn the specifics about how to use their specific API:
Garmin:
John Deere:
RavenSlingshot:
SPOT:
Trimble:
If you have successfully used another GPS device with FME,please comment below,and we will add it to this list.
[Question]Snapping GPS Trails to Road Centreline
[Question]Cleaning GPS Line Work
[Blog]GPS Meets Video.Do We Need a Standard for Geotagging Videos?
[Blog]CAT to GIS: Tracking Cats via GPS on Google Earth
[Blog]FME 2010 Use Case: Geo-tracking with FME
[Video]iOS ARKit and FME - GPS hike and OBJ model
[Video]Episode 7: Coders on Couches Drinking Coffee - Georeferenced Video
[Template]Vessel Tracking & Navigation Data
Hi,i have timestamped gps records in a database of several devices.
Those records are filtered in order to established a relationship with an area.
How can i retrieve time spent on a specific area ?
Thanks
I use Raven GPS systems for tracking industrial assets.Can I connect to the API using FME?How can I use FME to make my life easier?
Please add a reader for drone flight path log file - UBX format.
Thank,
WL
I have recently spoke with Trimble Priority Support in regards to their SSF/DDF/WPT Reader/Writers.They explained to me that they are no longer supporting them.With no plans to upgrade or maintain them.They also lock users into using 32bit FME rather than 64bit.
亚搏在线Safe should take these over so they are not lost with future upgrades to FME.
Hi,
I am using the translators PhotoCoordinateExtractor to VertexCreator and then writing to a shapefile in order to get points from photos.The problem is that the shapefiles then don't have a spatial reference.
Is there any way of getting what the spatial reference / projected coordinate system is from the EXIF information or any FME feature attribute?
Or should I just assume that its WGS84?
Here are the attributes I know exist,but I dont think any of them can answer my question:
exif_brightnessvalue (string) |
exif_imageuniqueid (string) |
fme_basename (string) |
fme_dataset (string) |
fme_feature_type (string) |
fme_geometry (string) |
fme_type (string) |
jpeg_exif_aperturevalue (string) |
jpeg_exif_colorspace (string) |
jpeg_exif_componentsconfiguration (string) |
jpeg_exif_datetime (string) |
jpeg_exif_datetimedigitized (string) |
jpeg_exif_datetimeoriginal (string) |
jpeg_exif_exifversion (string) |
jpeg_exif_exposurebiasvalue (string) |
jpeg_exif_exposuremode (string) |
jpeg_exif_exposureprogram (string) |
jpeg_exif_exposuretime (string) |
jpeg_exif_flash (string) |
jpeg_exif_flashpixversion (string) |
jpeg_exif_fnumber (string) |
jpeg_exif_focallength (string) |
jpeg_exif_focallengthin35mmfilm (string) |
jpeg_exif_gpsaltitude (string) |
jpeg_exif_gpsaltituderef (string) |
jpeg_exif_gpsdatestamp (string) |
jpeg_exif_gpslatitude (string) |
jpeg_exif_gpslatituderef (string) |
jpeg_exif_gpslongitude (string) |
jpeg_exif_gpslongituderef (string) |
jpeg_exif_gpstimestamp (string) |
jpeg_exif_gpsversionid (string) |
jpeg_exif_interoperability_index (string) |
jpeg_exif_interoperability_version (string) |
jpeg_exif_isospeedratings (string) |
jpeg_exif_make (string) |
jpeg_exif_makernote (string) |
jpeg_exif_maxaperturevalue (string) |
jpeg_exif_meteringmode (string) |
jpeg_exif_model (string) |
jpeg_exif_orientation (string) |
jpeg_exif_pixelxdimension (string) |
jpeg_exif_pixelydimension (string) |
jpeg_exif_resolutionunit (string) |
jpeg_exif_scenecapturetype (string) |
jpeg_exif_shutterspeedvalue (string) |
jpeg_exif_software (string) |
jpeg_exif_subsectime (string) |
jpeg_exif_subsectime_digitized (string) |
jpeg_exif_subsectime_original (string) |
jpeg_exif_usercomment (string) |
jpeg_exif_whitebalance (string) |
jpeg_exif_xresolution (string) |
jpeg_exif_ycbcrpositioning (string) |
jpeg_exif_yresolution (string) |
jpeg_type (string) |
Thanks for any advice!
/Sofia
Hi,
We are trying to distribute FME Workbench through Microsoft Virtualization and for that we would like to know how FME detects that GPSBabel is installed.In our current setup GPS-like readers and writers and their feature types are correctly placed in the workspace,however,running the workspace fails,telling:
FME API version of module 'NULL' matches current internal version (3.8 20160224)Creating reader for format: TomTom POITrying to find a DYNAMIC plugin for reader named `TOMTOM_POI'Loaded module 'TOMTOM_POI' from file 'E:\App-V_5\D52C8804-9F50-4D7B-A695-142DCEFE7A5E\87B5596E-AF57-4FA1-B219-EA631F902A79\Root\VFS\ProgramFilesX64\FME\plugins/GDAL.dll'FME API version of module 'TOMTOM_POI' matches current internal version (3.8 20160224)TOMTOM_POI reader: Opening file 'Z:\Temp\Webfleet\gulocPlStr16.ov2'TOMTOM_POI reader: Could not create process gpsbabel -i tomtom -f Z:\Temp\Webfleet\gulocPlStr16.ov2 -o gpx,gpxver=1.1 -F C:\Users\ex19111\AppData\Local\Temp\13\16688_0TOMTOM_POI reader: Could not create process gpsbabel -i tomtom -f Z:\Temp\Webfleet\gulocPlStr16.ov2 -o gpx,gpxver=1.1 -F C:\Users\ex19111\AppData\Local\Temp\13\16688_0TOMTOM_POI reader: Failed to open the dataset 'GPSBABEL:tomtom:Z:\Temp\Webfleet\gulocPlStr16.ov2'.Please ensure source data is valid and correct reader is selectedA fatal error has occurred.Check the logfile above for detailsFME Session Duration: 1.3 seconds.(CPU: 0.2s user,0.4s system)There seems to be not very much documentation on this except that FME needs GPSBabel to read/write GPS-like formats.
We are trying to install FME 2016.1.2.1 (20160929 - Build 16674 - WIN64) on
Microsoft Windows Server 2008 R2 Server 4.0,Enterprise Edition 64-bit Service Pack 1 (Build 7601).
We are using app-V 5.1,however,we're not stuck to FME 2016 and even planning to skip this and use FME 2017.1.
Looking at the logging,I would say FME does a blind call to GPSBabel executable,失败。Anyone has experience in this kind of setups?
Hi,we have several data sets where GPS software incorrectly handles overlapping tracking data that is buffered.
Any suggestions on how this might be recovered?
Note we don't have the raw data or centre lines
Thanks
Brian
Hello
I am trying to clean up some GPS line work before it is loaded into our database.THe lines need to be free of self intersections.I have come close to accomplishing this by buffering the line and then using the centreline replacer to create a smoothed line.The problem is that the centreline replacer is creating short dangles along the length of the line.The actual centreline it is creating is good enough for my purposes I just need to remove the dangles.If anyone has any ideas on how to do this it would be much appreciated.
In this screen shot the Green line is the original line with self intersections and the red line is the result of the centreline replacer.
I should think this is straight forward but I'm new to FME and hit a wall rather quickly.I have a road network file for the UK.I would like to merge the file on the a single attribute (NAME).However,there are some segments that don't have a value ("null") in the NAME field.I'm trying to merge the "null" records to the nearest segment that has an actual name rather than simply merging all the "null" values together.Then I need to simplify the road network for visualization purposes.Thank you in advance.
In this translation,we will take some tabular CSV data,representing points along a road,connect the points to create lines,join some attribute data to the lines from an access file and write the roads out to an Esri Shapefile.
Let's take a closer look at our source data.Many users work with spatial data in a delimited text format of some form,such as a CSV file like we have in this example.
This file contains GPS points representing surveyed roads;each record holds a road ID value,vertex number and XY coordinates for each point.The road ID is a unique identifier for each road so,these 12 records with Road ID equals 1,represent one road.We also have some road attributes in an Access file.Notice that there is also a road ID column in this table;we will use this key attribute to join these road attributes onto our lines during the translation.
View of the GPS point data in a CSV file
Note: This video was created with FME 2015,the concepts are similar but the user interface will be different.In this demo,we'll set up a 亚搏在线workflow to automatically import a CSV file of GPS data,convert it to GIS points and lines,join with a Microsoft Access file to get further attribute data,then write out to Esri Shapefile.You'll see how to control the output schema and clean up the attributes.
CSVToShape.zip (contains a completed workspace and data)
1.Add Reader
Let's get started by opening a blank workspace in FME Workbench.Add a CSV reader to the canvas and open up the Roads.csv dataset.View the parameters of the CSV file to confirm that FME has picked up the schema correctly.This data is in the City of Austin,Texas so we need to set up the coordinate system.For Coord.System enter TX83-CF and click OK to add the reader.
CSV Reader parameters,change the data type to x and y_coordinate
2.Create points with the VertexCreator
Add a VertexCreator to the canvas.In the parameters,set the X Value to x and the Y Value to y.Ensure that the Mode is set to Add Point.
3.Create lines with the LineBuilder
Place a LineBuilder transformer on the canvas;if we just ran the workspace without setting any LineBuilder parameters,we would get one messy looking line.We need to set the connection break attribute.Remember that the road ID is what uniquely represents each road;set this as the connection break attribute.
LineBuilder parameters,set the Connection Break Attributes to road_id
4.Join the data to an MS Access file containing attribute details
Now let's read in the roads_attrs.mdb MS Access file containing road attributes using the DatabseJoiner transformer,connect the DatabaseJoiner to the Lines Output port on the LineBuilder.In the parameters,read in the MS Access file and set the table to major_roads.Then for Feature Attribute set it to the road_id attribute and set the Table Field to ROAD_ID.For Fields to Add,click on the ellipsis,then select all of the features.The rest of the default values are good,click ok.
DatabaseJoiner,join on road_id and ROAD_ID
5.Write to Shapefile
Let's add a Shapefile writer,and then select automatic… for the definition.Browse to a folder to save the Shapefile to,then click ok.In the next dialog,enter Roads for the Shapefile Name,and set the Geometry to shape_polyline.Click ok and connect it to the Joined Output port on the DatabaseJoiner.
In the Shapefile Writer parameters,change the Shapefile Name to Roads,and the Geometry to shae_polyline
6.Clean up attributes and run translation
As soon as we connect it up with the DatabseJoiner,notice that the attributes are automatically populated based on what the destination feature type is connected to.Now,we really just want to see the attribute from the MS Access file in our final output so let's clean up the destination attributes.Double-click on the Shapefile writer to open the Destination Feature Type Properties and in the User Attributes tab click on Manual for the attribute definition;this allows us to edit the schema.Remove road_id,vertex_num,x and y;these came from the CSV file.Run the workspace and view the output.
Output of the road lines created from GPS points
Data Attribution
Data provided by the City of Austin and Travis County,Texas