|
From: Florent G. <flo...@ca...> - 2015-07-28 14:45:16
|
Hi, You might experience some troubles: using a custom projection has never been tested in gn3.0 map viewer. I don't think it's gonna work straightforward. However, first, you need to be sure you load your context. I can see different issues there. First guess is that the geonetwork keeps the current context in localStorage, it stores it on window unload event. You can try to go in map viewer / maps panel / load default map and see if it actually loads the correct context. Then, we can move toward next issue ;) Cheers On Tue, Jul 28, 2015 at 10:42 AM, Herbert, David J. <da...@ba...> wrote: > I have recently installed Geonetwork version 3.0.1, and am impressed by > the progress that's been made over version 2. There is a bit of a blocker > for us at the moment, however, since all our data is concerned with the > Polar regions and is in a Polar Stereographic projection (e.g. EPSG:3031). > The default map viewer in Mercator with Bing/OSM really won't do for our > applications because of the extreme distortion. So I have been > investigating how I might customize the map for our needs. This includes > using our own projection, together with our own WMS services to provide the > mapping. > > First, I have looked in the system settings under "configuration for > maps". I found out where the XML configuration files live in: > > webapps/geonetwork/WEB-INF/data/data/resources/map > > I created a Web Map Context document in this directory which I think > should give us what we want: > > <owc:OWSContext version="0.3.1" id="ows-context-ex-1-v3" > xmlns:owc="http://www.opengis.net/ows-context" > xmlns="http://www.opengis.net/ows-context" xmlns:gml=" > http://www.opengis.net/gml" > xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:ogc=" > http://www.opengis.net/ogc" > xmlns:ows="http://www.opengis.net/ows" xmlns:sld=" > http://www.opengis.net/sld" > xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi=" > http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.opengis.net/ows-context > http://www.ogcnetwork.net/schemas/owc/0.3.1/owsContext.xsd"> > <owc:General> > <ows:BoundingBox crs="EPSG:3031"> > <ows:LowerCorner>-5000000 > -5000000</ows:LowerCorner> > <ows:UpperCorner>5000000 5000000</ows:UpperCorner> > </ows:BoundingBox> > <ows:Title>ADD backdrop</ows:Title> > </owc:General> > <owc:ResourceList> > <!-- WMS Example --> > <owc:Layer name="add:antarctic_hillshade_and_bathymetry" > queryable="1" hidden="0"> > <ows:Title>ADD Hillshade and Bathymetry</ows:Title> > <ows:OutputFormat>image/png</ows:OutputFormat> > <owc:Server service="urn:ogc:serviceType:WMS" > version="1.3.0"> > <owc:OnlineResource > xlink:href=" > https://maps.bas.ac.uk/add/wms?SERVICE=WMS" /> > </owc:Server> > </owc:Layer> > <owc:Layer name="add:coastline" hidden="0"> > <ows:Title>ADD Coastline</ows:Title> > <owc:Server > service="urn:ogc:serviceType:WMS" version="1.3.0"> > <owc:OnlineResource xlink:href=" > https://maps.bas.ac.uk/add/wms?SERVICE=WMS" /> > </owc:Server> > </owc:Layer> > </owc:ResourceList> > </owc:OWSContext> > > I have put this JSON into "configuration for maps": > > {"viewerMap":"../../map/config-viewer-bas.xml","listOfServices":{"wms":[" > https://maps.bas.ac.uk/add/wms > "]},"useOSM":false,"context":"","layer":{"url":" > https://maps.bas.ac.uk/add/wms","layers":"add:hillshade_and_bathymetry","version":"1.3.0"},"projection":"EPSG:3031","projectionList":[{"code":"EPSG:3031","label":"Antarctic > Polar Stereographic (EPSG:3031)"},{"code":"EPSG:4326","label":"WGS84 > (EPSG:4326)"},{"code":"EPSG:3857","label":"Google mercator (EPSG:3857)"}]} > > And "List of CRS" contains: > > [{"code":"EPSG:2154","value":"+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 > +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 > +units=m +no_defs"},{"code":"EPSG:3031","value":"+proj=stere +lat_0=-90 > +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"}] > > But still the Bing Maps view appears, not any custom version. I am > beginning to think I'm missing a build step somewhere, or maybe need to > build GN3 from source in order to do this? Or maybe the "context" and > "layer" parameters in the config need to be set differently? I'm not clear > on their significance. > > Can anyone help please? > > Much appreciated. > > David Herbert > British Antarctic Survey. > > ________________________________ > This message (and any attachments) is for the recipient only. NERC is > subject to the Freedom of Information Act 2000 and the contents of this > email and any reply you make may be disclosed by NERC unless it is exempt > from release under the Act. Any material supplied to NERC may be stored in > an electronic records management system. > ________________________________ > > > ------------------------------------------------------------------------------ > _______________________________________________ > GeoNetwork-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geonetwork-users > GeoNetwork OpenSource is maintained at > http://sourceforge.net/projects/geonetwork > -- *camptocamp* INNOVATIVE SOLUTIONS BY OPEN SOURCE EXPERTS *Florent Gravin* 0479444492 |