WikiWatershed / rapid-watershed-delineation

Rapid Watershed Delineation Code for MMW2
Apache License 2.0
12 stars 6 forks source link

Reproject "original clicked" point #40

Closed mmcfarland closed 7 years ago

mmcfarland commented 7 years ago

The RWD service returns two points along with the generated polygon: original clicked point and snapped to stream point. The NHD variety of the call does not reproject the "original" point, so it's coordinates are in the original source projection and not rendered on the map. The original point is encoded as properties on the snapped point gejoson, under Lat and Lon.

    "input_pt": {
        "crs": {
            "type": "name",
            "properties": {
                "name": "urn:ogc:def:crs:OGC:1.3:CRS84"
            }
        },
        "type": "FeatureCollection",
        "features": [
            {
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -75.70075369516621,
                        40.31170565096853
                    ]
                },
                "type": "Feature",
                "properties": {
                    "Lat": 2104252.672046,
                    "Dist_moved": 21,
                    "Lon": 1696736.868729,
                    "ID": 1
                }
            }
        ]
    }
mmcfarland commented 7 years ago

For reference, a DRB result will return the input_pt object similar to:

    "input_pt": {
        "type": "FeatureCollection",
        "features": [
            {
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -75.700779,
                        40.311832
                    ]
                },
                "type": "Feature",
                "properties": {
                    "Lat": 40.311832,
                    "Dist_moved": 0,
                    "Lon": -75.700779,
                    "ID": 1
                }
            }
        ]
    }
mmcfarland commented 7 years ago

The coordinate system is likely that of #39