We connect to a custom server that provides cadastral information originally from the French national cartographic agency, IGN. We create a map and use the Style pane to re-style the web served image on the fly into a more usable form.
Manifold's imageserver dataport provides a Custom setting that allows utilizing a very wide range of web servers that provide image tiles using connection strings that contain some more-or-less typically encountered, but far from standard, control sequences. Control sequences are tokens within curly { } brackets that are substituted during the action of the server with values that control the result. To learn how a specific server uses control sequences, as well as learning other required information such as the tile size used and the zoom range supported, we must consult whatever documentation the server operator has provided.
In this example we connect to a custom server that is operated by the French OpenStreetMap organization. It republishes data from the French national cartographic service, IGN.
This topic uses a connection to a web server that is operated by a third party. Web servers operated by third parties may change their access policies, use different URLs, go offline, or be very slow. If you have any connection problems with the server in this topic, review the Notes at the end of the Web Servers topic for tips.
In Manifold, choose File - Create - New Data Source from the main menu, or right-click in the Project pane and from the menu choose Create - New Data Source.
Choose More... to launch the New Data Source dialog.
Enter Cadastral Data as the Name. We can enter whatever name we like, but it is wise to specify a name that reminds us of what this data source contains.
Choose Web Server: imageserver as the Type. In the subtype box just below the Type box, we choose Custom.
In the Source box we paste the URL connection string:
http://tms.cadastre.openstreetmap.fr/*/tout/{zoom}/{x}/{y}.png
How did we get this URL string? We found it in a web page that listed web servers that might be handy to use when editing OpenStreetMap.
Make sure to check the Cache data box, which is checked by default. This stores in cache memory everything Manifold downloads from the server, so that subsequent operations, such as panning and zooming, can take the data from cache and not have to download it again.
We leave the other settings at their default values, which usually work.
Press Create Data Source.
A new data source called Cadastral Data appears in the Project pane.
We can expand the data source to see it contains a image and the image's table. This particular Custom server has only a single image layer.
We could use the image from the data source as is, but it would be more convenient to create a local copy of the image in the project, which we can Style, and to then create a map from that local image.
For the difference between parts of the project that are resident in remote data sources and those parts of the project that are resident locally, see the Portals to Other Worlds discussion in the Project Pane topic.
To give us flexibility styling the image that is served by the Custom server, we will make a local copy of the image, but not the table.
We click the Web Image to highlight it and press Ctrl-C, the Windows keyboard shortcut for Copy. Next, we right-click down in the local part of the project, in the blank area below the Map component, and we choose Paste.
We can use any combination of the usual moves for copy and paste. For example, after highlighting the Web Image within the data source, we could have chosen Edit - Copy in the main menu, or we could have pressed the Copy icon in the Project pane toolbar. Or, we could have right-clicked the Web Image within the data source and chosen Copy from the context menu. Likewise, to Paste, we could have clicked into the lower portion of the Project pane and pressed Ctrl-V, the Windows keyboard shortcut for Paste, and so on.
That creates a local copy of the image, also called Web Image, which we can use as it if were the original image in the data source. The image we have just created takes its data from the table that is within the data source, but because it is a local structure under our full control in the local project, we can Style it as we like.
Since Web Image is an uninformative name for a layer in our project, we take a moment to rename the copy Cadastre, a French word.
It is convenient to work with layers within a map, so we can always have a "known good" background layer for context.
We create a map by right-clicking into a blank portion of the Project pane, outside of the Cadastral Data source and choosing Create - New Map.
For a base layer, we use the default Bing streets background layer, one of the standard Favorites built into Manifold.
The Cadastre layer automatically appears as a possible layer for the new map. We do not check the box, because later we will manually drag and drop the Cadastre image layer into the map.
Press Create Map.
A new map appears in the Project pane. The system also creates a new Bing Maps Street Map data source for the Bing streets base layer used in the map.
We double-click the Map to open it.
The map opens up zoomed to fit, with the Bing layer showing the entire world.
We zoom further into the map, into Europe, then into France, then to a region to the immediate Southwest of Paris, to the southern edge of Chartres, where the N10 comes into the N123 beltway route around Chartres, and the big Epicenter shopping center is located, with one of the biggest E. Leclerc supermarkets one might ever see.
We drag and drop the Cadastre image into the map.
Very slowly, the image will fill in. Since the "white space" in the Cadastre image is composed of pixels colored white, the new Cadastre layer completely hides the Bing layer below.
If we are following along in this example and repeating it, we should be aware that layers served from some custom servers can be incredibly slow. This is not Manifold being slow: it is simply a slow server.
We did not create the map with the Cadastre layer checked in the beginning, because the Cadastre layer is so slow to load it would make it difficult to work with the map. When servers are this slow, it is best to first zoom into the region desired, and only then add the slow layer.
It is annoying that the white pixels in the Cadastre layer hide what is below. We can fix that with a primitive, but useful, hack, using the Style pane to assign a transparent color to those pixels.
With the focus on the Cadastre layer in the open map window, in the Style pane we use the channel selector to switch from using RGBA channels to using Channel 0. The system will analyze the raster data, showing a "processing data" message for ten or so seconds.
We specify 10 breaks of equal intervals, press Tally to create intervals, and then we press the palette picker button to choose the Color Brewer palette called CB Blues. We reverse the palette ordering, and then we double-click into the color well for the last interval and choose transparent color.
That choice will color the entire layer using the value for the Blue (Channel 0) channel. The darker lines will tend to be in darker blue, the lighter blue of the lakes should come out to some reasonable lighter blue color, and values of 255, which is what the Blue channel is for white pixels, will be transparent. That ends up being a hack to color white pixels using transparent color.
Press Update Style.
The white pixels disappear, now colored transparent, so that the Bing layer underneath can be seen.
If we are familiar with French cadastral overview maps as published by IGN, we can see that some of the image tiles served by the openstreetmap server do not quite align, and cover each other. That seems to be a consequence of the OSM server republishing data it is getting from the IGN server and making some errors in how it passes on the data. That is a typical situation in the wild and crazy world of third party servers republishing data from yet other servers.
File - Create - New Data Source
Example: Spectacular Images and Data from Web Servers - A must see topic providing a gallery of views illustrating how Manifold can use web servers such as image servers and other free resources to provide a seemingly endless selection of spectacular background maps, satellite images and GIS data with nearly zero effort.
Example: Vector Layers from an ArcGIS REST Feature Server - Visit an ESRI web site, copy a URL, and then use that URL to connect to an ArcGIS REST web server that shows petroleum fields in Kansas, getting the data as a vector drawing layer. Style the layer as if it were local. ESRI refers to ArcGIS REST servers that provide vector data as feature servers.
Example: Connect to a WFS Server for State Government Data - Gathering our courage, we connect to a WFS server that provides 1200 vector layers, run by the state of Massachusetts. We open a layer showing airports and then scrape the vector data into our own local storage.
Example: Connect to a WMS Server for National Map Layers - Visit the National Map services web page, copy a URL for a shaded relief layer from USGS, and then use Style to enhance that shaded relief data for combination with other layers and really spectacular effects.
Example: Connect to a Custom OpenRailwayMap Server - We connect to a custom server that provides an OpenRailwayMap view of railroads worldwide, showing railway, tram, and subway infrastructure based on OpenStreetMap data. Our first try at creating a data source does not work. After consulting the Log Window we try again with a slight adjustment and our second try works.
Example: Connect to an OSM Vector Server - We connect to an OSM Server that provides a vector layer containing points and lines in the OpenStreetMap database. We then show how to scrape (copy) data from the OpenStreetMap server into local storage. We extract building footprints from the local copy.
Example: Raster Layers from an ArcGIS REST Image Server - Visit an ESRI web site, copy a URL, and then use that URL to connect to an ArcGIS REST web server that provide a raster layer showing a mosaic of aerial photographs near Portland, Oregon.