Esri / geoportal-server-catalog

Esri Geoportal Server is a next generation open-source metadata catalog and editor, based on elasticsearch.
https://www.esri.com/en-us/arcgis/products/geoportal-server/overview
Apache License 2.0
100 stars 62 forks source link

polar base map #71

Closed smrgeoinfo closed 1 year ago

smrgeoinfo commented 7 years ago

I'm deploying a geoportal for Antarctic data, and would like to make the map a south polar projection. Is there any way to do that?

mhogeweg commented 7 years ago

if you have a tiled polar basemap that could work (untested). check out:

...\geoportal\app\context\app-config.js

for search map configuration settings

and

...\geoportal\app\search\SpatialFilter.js

for the map control itself.

I can see some issues arising with projections and perhaps the spatial aggregation though (@umacgillivray )

smrgeoinfo commented 7 years ago

thanks, I'll have a look and update here.

smrgeoinfo commented 7 years ago

OK, In app-config.searchMap, the basemap is set to "streets"; this must be a key to some catalog of available base maps... is there a south polar projection in that catalog (?ArcMap online?) and what woul dbe its name string to put as the value of basemap=???

or is there a way to plug in a WMS from another source as the base map? Looks like EPSG:3031 is the projection I need, and there's a good WMST base map at http://gmrt.marine-geo.org/cgi-bin/mapserv?map=/public/mgg/web/gmrt.marine-geo.org/htdocs/services/map/wms_merc.map

smrgeoinfo commented 7 years ago

Looks like there's a bunch of coding in SpatialFilter.js that assumes webmercator projection, looks like would probable need a separate/new SpatialFilter module for polar projections.

valentinedwv commented 7 years ago

Modifications to get some map images. Filter does not work, though.

app/context/app-config.js

searchMap: {
      "basemapUrl": "http://services.arcgisonline.com/arcgis/rest/services/Polar/Antarctic_Imagery/MapServer",
      "mapOptions": {
          "extent": {
              "type": "extent",

              "xmin": -9913957.327914657,
              "ymin": -904876.8097533868,
              "xmax": 9913957.327914657,
              "ymax": 5730886.461773157,
              "spatialReference": {

                  "wkid": 3031
              }
          }
      },
    autoResize: true, 
    wrapAround180: false,
      center: [-3.369955099203E7 , 3.369955101703E7],
    zoom: 2
  },

viewer/config.json

"map": {
    "3D": false,
    "2D": true,
    "position": {
      "left": 0,
      "top": 0,
      "right": 0,
      "bottom": 0
    },

    "basemap": "6553466517dd4d5e8b0c518b8d6b64cb",
    "mapOptions": {
      "extent": {
        "type": "extent",

        "xmin": -9913957.327914657,
        "ymin": -904876.8097533868,
        "xmax": 9913957.327914657,
        "ymax": 5730886.461773157,
        "spatialReference": {

          "wkid": 3031
        }
      }
    }
  },
valentinedwv commented 7 years ago

SpatialFilter.js line 426: map.geographicExtent == undefined.

//console.warn("map.geographicExtent",map.geographicExtent);
    var env = map.geographicExtent;

changing index.html:

to

leads to other problems

valentinedwv commented 7 years ago

Going to have to calculate it ourselves:

Extent geographicExtent

The extent (or bounding box) of the map in geographic coordinates. Available only when the map's spatial reference is Web Mercator or Geographic (wkid 4326). (Added at v3.3)

=== Most likely use the geometry service: https://developers.arcgis.com/javascript/3/jssamples/util_coordinate_converter.html

or proj4js

valentinedwv commented 7 years ago

and modify the spatial filter so BBox show up: 172: this.own(topic.subscribe(appTopics.OnMouseEnterResultItem,function(params){ 181: if (geometry && webMercatorUtils.canProject(geometry,outSR)) {

mhogeweg commented 1 year ago

closing due to inactivity