I am loading a GPX file with a track and showing it in a Vector layer, no problem:
new ol.source.Vector({
url: 'https://openlayers.org/en/v3.19.1/examples/data/gpx/fells_loop.gpx',
format: new ol.format.GPX()
})
But I would also like to access the coordinates and timestamp of every trackpoint in order to calculate speed and heading along the track. I cannot find a way to hook into Openlayers in order to access this information. Any help will be appreciated!
I think u should work with features that u get in ur vector source
Related
So,I'm trying to create an applications, where the user sets his destination on a map - let's say from Home to work-, then (with the help of google maps)a direction line shows on the map to guide the user to his destination, or to work in our example .
What I'm trying to achieve here is that I want the app to show any coffee house that is going to be on the user's way to work,or slightly around it, but I'm not sure how to tackle this head scratcher .
Is there a way to know if a point (C) , falls within a straight line between A and b ? or falls close by factor(x) to the line between A and B ?
I created a gist which is a Swift translation of locationIndexOnEdgeOrPath function and all the other required functions present in PolyUtil.java.
The parameters you need to pass are the co-ordinates of the point you want to check and the array of points that represent the path. (Your case only includes start and end point, so just pass those two)
The other parameters needed are closed which represents whether a line should be drawn from the last point to first point in order to close the loop; geodesic which means if the earth's curvature should be taken into consideration.
Finally, toleranceEarth is the last parameter where you need to specify how close to the path is considered being on the path.
I am using Maxima and I have a lot of resulting plots that I want to save on drive for other uses (making GIF...etc)
This is what I am looking at:
Is there any code that can autosave the plots instead of having to save it manually one by one?
Thank you in advance.
Well, one approach is to specify a file name in the arguments of plot2d. Then the plot is output directly to the file and it doesn't show up in the GUI. E.g.,
plot2d (sin(x), [x, 0, 10], [png_file, "mysinplot.png"]);
plot2d recognizes png_file, pdf_file, ps_file and svg_file. In each case, ? png_file, etc, will show some info about that.
Note that there isn't any file output flag for GIF output. The closest thing is PNG which is similar to GIF.
I think draw also recognizes different file formats but I don't know about that without searching the documentation.
If you are generating a lot of plots, it might be convenient to automatically generate file names via sconcat, e.g. sconcat("myplot", i, ".png") produces "myplot10.png" when i is equal to 10.
I'm new to this .. I am working on some mapping project and I need help filtering LIDAR pointcloud data. I have two questions and i hope you can help in this:
1) Can you use Veloview to filter Point Cloud data? Can you crop the data captured? if so, what's the process?
2) Can you export/convert PCAP file in .csv?
Thanks
Have a look at VeloView User Guide
For manipulation and analysis purpose, you can use Veloview-python console interface mentioned in section III - Python Console.
For cropping the captured data:
File --> Save As --> [preferred option] --> Frames from.
I've been attempting to export boundary information from an OSM file. My process is nearly there however I have an issue with the polygon I'm generating drawing random lines.
I would appreciate some insight on where I may be going wrong.
Step 1: Export the OSM data into XML
osmfilter -v greater-london-latest.osm --keep="boundary= admin_level= place=" > b.txt
Step 2: Run a script to process the XML.
cycle each relation node
load the member ways
load the nodes from each specified way
record the lat/lon and build a poly set
This produces a series of lat/lon which when I build them as a polygon give the correct overall shape I'm looking for. However, there are issues with the connecting lines I assume..
My polygon output
I'm actually looking for this, which is similar but Im obviously missing something.
Actual Poly Im looking to generate
Again, thanks for any help.
Ways in relations are not necessarily sorted. See answers to this question on how to sort ways, especially the answer by user geocodezip.
Alternatively you can make use of various tools/libraries to do the sorting for you. Unfortunately I can't point you directly to one but there are various tools capable of sorting relation members, including the OSM website itself, JOSM, overpass turbo (I guess), some JS stuff, [...].
Maybe some other user can help out with pointing to some good examples?
I have geo data, that contain X field like: 1012532,749 and Y field like: 178774,7655. This data from the shapefile format, but I don`t know in what GEO standart this data is.
Maybe someone know, or can show me the way to find out, how translate this coords in GPS.
From your comment the situation is clear:
You got an invalid shape file:
The prj file states WGS84 coordinates in decimal degrees
which has range: (longitude(x) [-180-.0, 180.0], latitude(y): [-90.0, 90.0].
But the coordinates posted are not in valid range.
The prj definition does not fit to the rest of the shape files (your posted coordinate).
(This happens because the prj file is optional, and has probably the default settings of some other project)
There is little chance of knowing, without further knowlegde.
Simply ask the data provider which geographical datum (name) the coordinates are related to. Further you should claim, that the file is erorrnous and that they should provide a correct prj file (or remove the prj file, if the coordinates are not related to world coordinates)
IF you know the source, e.g the swiss "Landesvermessung" then you could think it is for example a "Swiss Grid CH1903+ / LV95" grid system. (This was an example, the coordinates are not in that Swiss grid)
But it does not make sense to reverse engineer that, just ask the data provider, or if appliable read the info where you have got that data from.