yermo / geophpwithfeatures Goto Github PK
View Code? Open in Web Editor NEWThis project forked from phayes/geophp
Advanced geometry operations in PHP with Features Data
License: Other
This project forked from phayes/geophp
Advanced geometry operations in PHP with Features Data
License: Other
Adding a & or other illegal characters into names or other meta data generates an incorrect file.
<wpt
lat="39.684955555556" lon="-77.468375" />`
when converted to geojson yields:
"features" : [ { "type" : "Point", "coordinates" : [ -77.468375, 39.684955555556, null ] },
Note the missing geometry key.
Did you think about registering the fork on an own namespace on Packagist ?
Converting the following GPX file to geojson:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<metadata>
<link href="http://www.garmin.com">
<text>Garmin International</text>
</link>
<time>2013-05-27T17:23:57Z</time>
</metadata>
<wpt lat="35.466436" lon="-83.920083">
<ele>573.07</ele>
<name>Deals Gap</name>
<sym>Waypoint</sym>
</wpt>
</gpx>
becomes:
{
"properties" : {
"link" : [
{
"text" : "Garmin International",
"href" : "http://www.garmin.com"
}
],
"time" : "2013-05-27T17:23:57Z"
},
"type" : "FeatureCollection",
"features" : [
{
"properties" : {
"name" : "Deals Gap",
"sym" : "Waypoint",
"elevation" : "573.07"
},
"geometry" : {
"coordinates" : [
-83.920083,
35.466436,
573.07,
{
"elevation" : "573.07"
}
],
"type" : "Point"
},
"type" : "Feature"
}
]
}
Converting it back to GPX yields:
<?xml version="1.0"?>
<metadata>
<time>2013-05-27T17:23:57Z</time>
</metadata>
<wpt lat="35.466436" lon="-83.920083">
<time>2013-05-27T17:23:57Z</time>
</wpt>
</gpx>
Currently, an abbreviated properties object is included as the fourth position in the route coordinates array.
{
"features" : [
{
"geometry" : {
"type" : "LineString",
"coordinates" : [
[
-77.463442,
39.526728,
null,
{
"extensions" : {
"gpxx_routepointextension" : [
[
"-77.463442",
"39.526642"
],
[
"-77.463056",
"39.526620"
],
This is proving to be inconvenient.
Modify this to store a complete Point Feature in this position to mirror a waypoint entry. The only difference between a standalone waypoint marker entry and this copy will be the presence of the gpxx_routepointextension coordinate array.
e.g.:
"geometry" : {
"coordinates" : [
[
-83.92005443573,
35.466550939862,
null,
{
"name" : "Unnamed",
"properties" : {
"cmt" : "This is a comment about the Deal's Gap Start Point",
"name" : "Deals Gap Start"
"link" : [
{
"href" : "http://dealsgap.com "
}
],
"desc" : "This is a test of the deals gap start waypoint",
"extensions" : {
"gpxx_routepointextension" : [
[
-83.920013,
35.466556
],
[
-83.920028,
35.467197
],
Add support for the Miles By Motorcycle GPX extension.
Garmin Basecamp raises an "invalid GPX file" error when attempting to import GPX files created with this library. It appears that the tags under metadata have to be in a specific order.
<desc>A stone's throw</desc>
Where the ' is an โ causes an invalid GPX file to be generated.
Currently, when exported to our extended GeoJSON format, the route point extension which describes the points between two route way points is a list of coordinates with some metadata. This is awkward.
It should be represented as a line string feature with its own geometry and properties keys.
The GeoJSON representation of a GPX marker duplicates properties under as a fourth entry into the coordinates array.
The order of elements in GPX export is once again incorrect.
Fix it and add a test to make sure the GPX files generated validate.
I am getting an "empty" (no features in it) GPX output on the attached file.
php geo_convert.php --input-path=../../654.geojson --input-format=geojson --output-path=../../654.gpx --output-format=gpx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.