Skip to content

Commit

Permalink
#581 stac-collection URLs, improve inline configure docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Oct 22, 2024
1 parent b3e92c4 commit 34f8484
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 41 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ See the [configuration documentation](https://nasa-ammos.github.io/MMGIS/configu
1. GDAL and Python are weaker dependencies (desirable but, without them, not everything will work)

- GDAL [2.+](https://gdal.org/download.html) with Python bindings (Windows users may find [these](https://github.com/cgohlke/geospatial-wheels/releases) helpful)
- Python [3.6+](https://www.python.org/downloads/release/python-396/)
- `python -m pip install numpy`
- Python [>=3.10 and <3.13](https://www.python.org/downloads/)
- From root MMGIS directory: `python -m pip install -r python-requirements.txt`
- Ensure your `PROJ_LIB` system ENV points to the proj.db install through python.
- Note: MMGIS expects and uses the command `python` only and not `python3` or variations.

### Setup
Expand Down
4 changes: 4 additions & 0 deletions adjacent-servers/titiler-pgstac/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ DEBUG=
TITILER_DEBUG=
TITILER_PGSTAC_API_DEBUG=

# keep these false if mosaicking has issues
TITILER_PGSTAC_SEARCH_EXITWHENFULL=FALSE
TITILER_PGSTAC_SEARCH_SKIPCOVERED=FALSE

POSTGRES_USER=
POSTGRES_PASS=
POSTGRES_DBNAME=
Expand Down
29 changes: 18 additions & 11 deletions configure/src/core/Maker.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@ const useStyles = makeStyles((theme) => ({
margin: "40px 20px 0px 20px",
},
subtitle2: {
fontSize: "12px !important",
fontStyle: "italic",
fontSize: "13px !important",
width: "100%",
marginTop: "2px !important",
marginBottom: "8px !important",
color: theme.palette.swatches.grey[400],
whiteSpace: "pre-wrap",
lineHeight: 1.33,
letterSpacing: "0.00938em",
},
text: {
width: "100%",
Expand Down Expand Up @@ -249,9 +251,10 @@ const getComponent = (
{inlineHelp ? (
<>
{inner}
<Typography className={c.subtitle2}>
{com.description || ""}
</Typography>
<div
className={c.subtitle2}
dangerouslySetInnerHTML={{ __html: com.description || "" }}
></div>
</>
) : (
<Tooltip title={com.description || ""} placement="top" arrow>
Expand Down Expand Up @@ -872,9 +875,11 @@ const makeConfig = (
);
if (row.description) {
made.push(
<div className={clsx(c.rowDescription)} key={`${idx}_desc`}>
{row.description}
</div>
<div
className={clsx(c.rowDescription)}
key={`${idx}_desc`}
dangerouslySetInnerHTML={{ __html: row.description || "" }}
></div>
);
}
}
Expand All @@ -889,9 +894,11 @@ const makeConfig = (
);
if (row.subdescription) {
made.push(
<div className={clsx(c.rowDescription)} key={`${idx}_desc`}>
{row.subdescription}
</div>
<div
className={clsx(c.rowDescription)}
key={`${idx}_desc`}
dangerouslySetInnerHTML={{ __html: row.subdescription || "" }}
></div>
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion configure/src/metaconfigs/layer-data-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
},
{
"subname": "Color Ramps",
"description": "Color ramps for which to dynamically color the data tiles. A good site for color ramps is: https://developers.arcgis.com/javascript/latest/visualization/symbols-color-ramps/esri-color-ramps/",
"description": "Color ramps for which to dynamically color the data tiles. A good site for color ramps is: <a target='__blank' href='https://developers.arcgis.com/javascript/latest/visualization/symbols-color-ramps/esri-color-ramps/'>https://developers.arcgis.com/javascript/latest/visualization/symbols-color-ramps/esri-color-ramps/</a>",
"components": [
{
"field": "variables.shader.ramps.0",
Expand Down
6 changes: 3 additions & 3 deletions configure/src/metaconfigs/layer-model-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{
"field": "url",
"name": "URL",
"description": "A file path that points to a .dae or .obj. If the path is relative, it will be relative to the missions directory.",
"description": "A file path that points to a .dae or .obj. If the path is relative, it will be relative to the mission's directory.",
"type": "text",
"width": 12
}
Expand Down Expand Up @@ -385,7 +385,7 @@
{
"field": "time.format",
"name": "Time Format",
"description": "The string format to be used in the URL for {starttime} and {endtime}. Uses D3 time format specifiers: https://github.com/d3/d3-time-format. Default: %Y-%m-%dT%H:%M:%SZ",
"description": "The string format to be used in the URL for {starttime} and {endtime}. Uses D3 time format specifiers: <a target='__blank' href='https://github.com/d3/d3-time-format'>https://github.com/d3/d3-time-format</a>. Default: %Y-%m-%dT%H:%M:%SZ",
"type": "text",
"width": 6
}
Expand Down Expand Up @@ -660,7 +660,7 @@
{
"field": "icon",
"name": "Icon Name",
"description": "Any Material Design Icon name: https://pictogrammers.com/library/mdi/",
"description": "Any Material Design Icon name: <a target='__blank' href='https://pictogrammers.com/library/mdi/'>https://pictogrammers.com/library/mdi/</a>",
"type": "text",
"width": 3
},
Expand Down
6 changes: 3 additions & 3 deletions configure/src/metaconfigs/layer-query-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@
{
"field": "time.format",
"name": "Time Format",
"description": "The string format to be used in the URL for {starttime} and {endtime}. Uses D3 time format specifiers: https://github.com/d3/d3-time-format. Default: %Y-%m-%dT%H:%M:%SZ",
"description": "The string format to be used in the URL for {starttime} and {endtime}. Uses D3 time format specifiers: <a target='__blank' href='https://github.com/d3/d3-time-format'>https://github.com/d3/d3-time-format</a>. Default: %Y-%m-%dT%H:%M:%SZ",
"type": "text",
"width": 6
}
Expand Down Expand Up @@ -783,7 +783,7 @@
{
"field": "icon",
"name": "Icon Name",
"description": "Any Material Design Icon name: https://pictogrammers.com/library/mdi/",
"description": "Any Material Design Icon name: <a target='__blank' href='https://pictogrammers.com/library/mdi/'>https://pictogrammers.com/library/mdi/</a>",
"type": "text",
"width": 3
},
Expand Down Expand Up @@ -932,7 +932,7 @@
{
"field": "variables.dynamicExtent",
"name": "Enabled",
"description": " If true, tries to only query the vector features present in the user's current map viewport. This can be very performant for large vector datasets especially if minimum and maximum zooms are set for the layer. Pan and zooming causes requeries. If used with a geodataset, the time and extent queries will work out-of-the-box. Otherwise, if using an external server, the following parameters in {} will be automatically replaced on query in the url: 'starttime={starttime}&endtime={endtime}&startprop={startprop}&endprop={endprop}&crscode={crscode}&zoom={zoom}&minx={minx}&miny={miny}&maxx={maxx}&maxy={maxy}'. This setting is not advised if the data source is a straight geojson file because it expects a server that can crop the data to given extents.",
"description": "If true, tries to only query the vector features present in the user's current map viewport. This can be very performant for large vector datasets especially if minimum and maximum zooms are set for the layer. Pan and zooming causes requeries. If used with a geodataset, the time and extent queries will work out-of-the-box. Otherwise, if using an external server, the following parameters in {} will be automatically replaced on query in the url: 'starttime={starttime}&endtime={endtime}&startprop={startprop}&endprop={endprop}&crscode={crscode}&zoom={zoom}&minx={minx}&miny={miny}&maxx={maxx}&maxy={maxy}'. This setting is not advised if the data source is a straight geojson file because it expects a server that can crop the data to given extents.",
"type": "switch",
"width": 3,
"defaultChecked": false
Expand Down
6 changes: 3 additions & 3 deletions configure/src/metaconfigs/layer-tile-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{
"field": "url",
"name": "URL",
"description": "A path that points to a tileset, service, or file. If the path is relative, it will be relative to the mission's /Missions/{mission} directory.\n\t• TMS: Tile Map Service tiles are 256x256 sized images hierarchically organized by zoom level and referenced with x and y coordinates. These are the standard format for web tiles and are the format that MMGIS's auxiliary tiling scripts output. Append /{z}/{x}/{y}.png to your URL.\n\t• WMTS: Web Map Tile Service is the same exact concept as TMS but it has an inverted Y-axis. Just like TMS, append /{z}/{x}/{y}.png to your URL.\n\t• WMS: Web Map Service tiles are a popular way of publishing maps by professional GIS software. This format is similar to the previous two formats, but more generic and not so well optimized for use in web maps. A WMS image is defined by the coordinates of its corners. A layer (or list of layers) should be provided as an options by appending ?layers=<your_layer_name><,another_if_you _want> to your URL. To override WMS parameters append &<wms_param>=<value> again to the URL after the 'layers' parameters. If desired, use &TILESIZE= to change the tile size of the request and layer away from the default of 256. Example URL: http://ows.mundialis.de/services/service?layers=TOPO-WMS,OSM-Overlay-WMS\n\t• GeoTiff: A URL to the .tif. Note that this is not tiled and clients will download the entire file.\n\t• COG: A URL to the .tif and make sure the 'Use TiTiler' option is enabled.",
"description": "A path that points to a tileset, service, or file. If the path is relative, it will be relative to the mission's /Missions/{mission} directory.\n\t<strong>• TMS:</strong> Tile Map Service tiles are 256x256 sized images hierarchically organized by zoom level and referenced with x and y coordinates. These are the standard format for web tiles and are the format that MMGIS's auxiliary tiling scripts output. Append /{z}/{x}/{y}.png to your URL.\n\t<strong>• WMTS:</strong> Web Map Tile Service is the same exact concept as TMS but it has an inverted Y-axis. Just like TMS, append /{z}/{x}/{y}.png to your URL.\n\t<strong>• WMS:</strong> Web Map Service tiles are a popular way of publishing maps by professional GIS software. This format is similar to the previous two formats, but more generic and not so well optimized for use in web maps. A WMS image is defined by the coordinates of its corners. A layer (or list of layers) should be provided as an options by appending ?layers=<your_layer_name><,another_if_you _want> to your URL. To override WMS parameters append &<wms_param>=<value> again to the URL after the 'layers' parameters. If desired, use &TILESIZE= to change the tile size of the request and layer away from the default of 256. Example URL: http://ows.mundialis.de/services/service?layers=TOPO-WMS,OSM-Overlay-WMS\n\t<strong>• GeoTiff:</strong> A URL to the .tif. Note that this is not tiled and clients will download the entire file.\n\t<strong>• COG:</strong> A URL to the .tif and make sure the 'Use TiTiler' option is enabled.\nThe following constructed URLs can also be used:\n\t<strong>• 'stac-collection:{collection}'</strong> - If titiler-pgstac is available, the tileset is the mosaicked COGs within the specified STAC collection.",
"type": "text",
"width": 8
}
Expand Down Expand Up @@ -96,7 +96,7 @@
{
"field": "tileMatrixSet",
"name": "Tile Matrix Set",
"description": "If using TiTiler, specify the projection for which to serve the tiles.",
"description": "If using TiTiler or if using a 'stac-collection:{collection}' URL, specify the projection for which to serve the tiles. Defaults to 'WebMercatorQuad'.",
"type": "dropdown",
"width": 4,
"options": "{{TILE_MATRIX_SETS}}"
Expand Down Expand Up @@ -490,7 +490,7 @@
{
"field": "timeFormat",
"name": "Time Format",
"description": "A string for formatting the injected '{starttime}' and '{endtime}' in the url. See syntax in https://d3js.org/d3-time-format#locale_format",
"description": "A string for formatting the injected '{starttime}' and '{endtime}' in the url. See syntax in <a target='__blank' href='https://d3js.org/d3-time-format#locale_format'>https://d3js.org/d3-time-format#locale_format</a>",
"type": "text",
"width": 4
}
Expand Down
10 changes: 5 additions & 5 deletions configure/src/metaconfigs/layer-vector-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"field": "url",
"name": "URL",
"description": "A file path that points to a geojson. If the path is relative, it will be relative to the mission's directory. The URL must contain a proper placeholder ending such as: {z}/{x}/{y}.png. Alternatively vectors can be served with Geodatasets. Simply go to 'Manage Geodatasets' at the bottom left, upload a geojson and link to it in this URL field with 'geodatasets:{geodataset*name}'",
"description": "A file path that points to a geojson. If the path is relative, it will be relative to the mission's directory. The URL must contain a proper placeholder ending such as: {z}/{x}/{y}.png.\nAlternatively vectors can be served with Geodatasets or through API calls via the following constructed URLs:\n\t<strong>• 'geodatasets:{geodataset_name}'</strong> - Simply go to 'Manage Geodatasets' at the bottom left, upload a geojson and link to it in this URL field with 'geodatasets:{geodataset_name}'\n\t<strong>• 'api:publishedall'</strong> - Grabs all features published via the DrawTool.\n\t<strong>• 'api:published:{file_intent}'</strong> - Grabs all features published via the DrawTool of a certain intent. Possible values are: roi, campaign, campsite, signpost, trail, all\n\t<strong>• 'api:drawn:{file_id}'</strong> - Grabs a user drawn file from the DrawTool. The file_id is an integer and can be found by hovering over the desired file in the DrawTool. Note that if the file chosen is still private, the file owner will be the only user who can view it.",
"type": "text",
"width": 12
}
Expand Down Expand Up @@ -252,7 +252,7 @@
{
"field": "style.shapeIcon",
"name": "Shape From Icon",
"description": "Shape but taken from the Material Design Icon (mdi) library. akes priority over the value in the 'shape' field. See https://pictogrammers.com/library/mdi/",
"description": "Shape but taken from the Material Design Icon (mdi) library. akes priority over the value in the 'shape' field. See <a target='__blank' href='https://pictogrammers.com/library/mdi/'>https://pictogrammers.com/library/mdi/</a>",
"type": "text",
"width": 3
},
Expand Down Expand Up @@ -396,7 +396,7 @@
{
"field": "time.format",
"name": "Time Format",
"description": "The string format to be used in the URL for {starttime} and {endtime}. Uses D3 time format specifiers: https://github.com/d3/d3-time-format. Default: %Y-%m-%dT%H:%M:%SZ",
"description": "The string format to be used in the URL for {starttime} and {endtime}. Uses D3 time format specifiers: <a target='__blank' href='https://github.com/d3/d3-time-format'>https://github.com/d3/d3-time-format</a>. Default: %Y-%m-%dT%H:%M:%SZ",
"type": "text",
"width": 6
}
Expand Down Expand Up @@ -671,7 +671,7 @@
{
"field": "icon",
"name": "Icon Name",
"description": "Any Material Design Icon name: https://pictogrammers.com/library/mdi/",
"description": "Any Material Design Icon name: <a target='__blank' href='https://pictogrammers.com/library/mdi/'>https://pictogrammers.com/library/mdi/</a>",
"type": "text",
"width": 3
},
Expand Down Expand Up @@ -821,7 +821,7 @@
{
"field": "variables.dynamicExtent",
"name": "Enabled",
"description": " If true, tries to only query the vector features present in the user's current map viewport. This can be very performant for large vector datasets especially if minimum and maximum zooms are set for the layer. Pan and zooming causes requeries. If used with a geodataset, the time and extent queries will work out-of-the-box. Otherwise, if using an external server, the following parameters in {} will be automatically replaced on query in the url: 'starttime={starttime}&endtime={endtime}&startprop={startprop}&endprop={endprop}&crscode={crscode}&zoom={zoom}&minx={minx}&miny={miny}&maxx={maxx}&maxy={maxy}'. This setting is not advised if the data source is a straight geojson file because it expects a server that can crop the data to given extents.",
"description": "If true, tries to only query the vector features present in the user's current map viewport. This can be very performant for large vector datasets especially if minimum and maximum zooms are set for the layer. Pan and zooming causes requeries. If used with a geodataset, the time and extent queries will work out-of-the-box. Otherwise, if using an external server, the following parameters in {} will be automatically replaced on query in the url: 'starttime={starttime}&endtime={endtime}&startprop={startprop}&endprop={endprop}&crscode={crscode}&zoom={zoom}&minx={minx}&miny={miny}&maxx={maxx}&maxy={maxy}'. This setting is not advised if the data source is a straight geojson file because it expects a server that can crop the data to given extents.",
"type": "switch",
"width": 3,
"defaultChecked": false
Expand Down
Loading

0 comments on commit 34f8484

Please sign in to comment.