Yermo / geoPHPwithFeatures

Advanced geometry operations in PHP with Features Data
Other
5 stars 4 forks source link

Store a complete Feature entry as a route waypoint #6

Closed Yermo closed 7 years ago

Yermo commented 7 years ago

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
                                    ],