Checked for duplicates
Yes - I've already checked
π§βπ¬ User Persona(s)
Data User, GIS Analyst, Web Developer, Data Visualization Engineer
πͺ Motivation
...so that I can visualize product footprints and metadata on web maps using tools like Leaflet, Mapbox, QGIS, and other GIS platforms.
π Additional Details
Current Behavior:
- β
as_dataframe() exports to pandas DataFrame
- β No GeoJSON export capability
- β Users must manually extract spatial fields and construct GeoJSON
Proposed Solution:
Export results as valid GeoJSON with spatial geometries:
# Export with spatial field configuration
geojson = products.has_target("Mars").observationals().as_geojson(
lat_field="orex:Spatial.orex:latitude",
lon_field="orex:Spatial.orex:longitude",
output_file="mars_data.geojson"
)
# Support different geometry types
products.as_geojson(
geometry_type="bbox",
lat_min_field="geom:bbox.lat_min",
lat_max_field="geom:bbox.lat_max",
lon_min_field="geom:bbox.lon_min",
lon_max_field="geom:bbox.lon_max"
)
# Select specific properties to include
products.as_geojson(
lat_field="orex:Spatial.orex:latitude",
lon_field="orex:Spatial.orex:longitude",
properties=["pds:Identification_Area.pds:title", "lidvid"]
)
GeoJSON Output Structure:
{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-122.5, 37.8]
},
"properties": {
"lidvid": "urn:nasa:pds:...:1.0",
"title": "Mars Image",
"start_date_time": "2020-01-01T00:00:00Z"
},
"id": "urn:nasa:pds:...:1.0"
}]
}
Implementation Approach:
- Add
as_geojson() method to QueryBuilder
- Support Point, BBox/Polygon geometry types
- Configurable property selection
- Handle missing/invalid spatial data gracefully
- Use standard library
json (no new dependencies)
Related:
For Internal Dev Team To Complete
Acceptance Criteria
Given a user wants to visualize PDS products on a web map
When I perform products.as_geojson(lat_field="...", lon_field="...")
Then I expect a valid GeoJSON FeatureCollection with product metadata and geometries
βοΈ Engineering Details
To be filled by Engineering Node Team
π I&T
To be filled by Engineering Node Team
Checked for duplicates
Yes - I've already checked
π§βπ¬ User Persona(s)
Data User, GIS Analyst, Web Developer, Data Visualization Engineer
πͺ Motivation
...so that I can visualize product footprints and metadata on web maps using tools like Leaflet, Mapbox, QGIS, and other GIS platforms.
π Additional Details
Current Behavior:
as_dataframe()exports to pandas DataFrameProposed Solution:
Export results as valid GeoJSON with spatial geometries:
GeoJSON Output Structure:
{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-122.5, 37.8] }, "properties": { "lidvid": "urn:nasa:pds:...:1.0", "title": "Mars Image", "start_date_time": "2020-01-01T00:00:00Z" }, "id": "urn:nasa:pds:...:1.0" }] }Implementation Approach:
as_geojson()method to QueryBuilderjson(no new dependencies)Related:
For Internal Dev Team To Complete
Acceptance Criteria
Given a user wants to visualize PDS products on a web map
When I perform
products.as_geojson(lat_field="...", lon_field="...")Then I expect a valid GeoJSON FeatureCollection with product metadata and geometries
βοΈ Engineering Details
To be filled by Engineering Node Team
π I&T
To be filled by Engineering Node Team