Subscribe to this thread
Home - General / All posts - convert osm server to georeference raster usgin location
lionel

560 post(s)
#11-Nov-18 15:37

Hi

is there a way in manifold 9 after set custom zoom and position ( save using location) to have a static georeference raster of the location to avoid use the dynamic raster ( from osm server so i can delete it ) ?

In a way i want to know if it is possible to convert all mdf_meta and mfd_root attach to osm server and location in one raster file that contain georeference information !!

regard's

Attachments:
server_2_local.png


join image

"Because my dad promised me" ( interstellar ) but blackhole don't exist

best hardware with no ads focus on quality features price like manifold see xiaomi

geozap124 post(s)
#12-Nov-18 08:05

Do you want to accomplish something similiar to what the Tools-Make Image command does in Manifold8? There is not such a command in M9 yet, neither a template for that. I don't know if you could do that programmatically.

adamw


8,331 post(s)
#12-Nov-18 10:23

You can do in 9 what Tools - Make Image does in 8 programmatically - at least for images. This would perhaps be good material for an add-in.

That said, we might add a UI command analogous to Tools - Make Image as well, for components other than images.

steveFitz

230 post(s)
#30-Jan-19 00:54

I too could make use of a Make Image type tool or Add-in.

Any guidance on how to set about making the Add-in? Transforms or Queries?

Steve

adamw


8,331 post(s)
#31-Jan-19 09:09

I too could make use of a Make Image type tool or Add-in.

Any guidance on how to set about making the Add-in? Transforms or Queries?

The bulk of the work is in writing a script that works just as a component.

Then you just take the script, save it as a file and put it into (a subfolder in) one of the Manifold folders (typically, ~\shared so that it is available in both 32-bit and 64-bit modes, and if you want to restrict it to just one mode, use either ~\bin or ~\bin64). The file then appears as a menu item under Tools - Add-ins. For running instances of 9, do Tools - Add-ins - Rescan to let the system refresh available add-ins after you save the file.

For the task at hand:

If we are talking about saving a portion of an image, I'd create a dialog asking for image name, the bounds to crop to and the scale. Then I'd generate a query that would compose a new image based on the input data, run that query, save the resulting image and delete it.

After that, we'll probably want some data from the UI - we can absolutely extend the object model to expose whatever is necessary.

Rendering drawings / labels / maps / layouts as images is quite a bit more involved and needs support from the side of the object model. We can absolutely add it, it's just a question of priorities.

KlausDE

6,283 post(s)
#30-Jan-19 08:05

The Tools - Make Image UI command has been very important for me working with Mfd8 every day.

Screenshots are a workaround in many situations but for instance to import the Mfd8 image in an AutoCAD layout set as THE format for delivery by the client was a convenient way to stay with my preferred program for the real work.

A printer driver to PNG/JPG files would be another workaround for Mfd9. But I don't like workarounds for important features.

geozap124 post(s)
#30-Jan-19 13:48

For me too is of top importance. I had send a suggestion for what M8 does, plus the option to "download" an image of an area from a wms server without having to pan around to catch wms image tiles.

But still, at present time with M9 you can't handle an image by pixels, but by tiles. So maybe it's early for a Tools-Make Image option.

steveFitz

230 post(s)
#30-Jan-19 23:54

My work around, for today at least, was to use QGIS to put a control point layer over a WMS image to mark a couple of control points, paste a screen shot of the image with controls points into M8, carefully put control points in the centre of the points in the image, import the control point layer from QGIS using a shp file, drop control points on the layer (using snap to points) and georegister the image to it. Phew!

Worse if your image is larger than the screen and you need to recreate it from a patchwork of screen shots!

geozap124 post(s)
#31-Jan-19 06:08

Your workaround is about M8? Why you do manually georeference the image? In M8 if you want and image of the screen contents you set "current window" in the "paint" setting of Tools-Make Image and you get a georeferenced image of the screen contents.

The problem is when you want an image larger than the screen contents for a certain scale. Then you have pan all around the area you need in order to catch the image at the desired scale. For an area of few square km it can take half an hour (or more) for an image in a resolution good enough to be printed in 1:2000 or 1:1000. Then you set "centred view in current scale" in the "paint" setting. The whole procedure could be done in 1-2 minutes if you could just set the image extends you want, the final image size in pixels (or its resolution), and let the software "download" it in Manifold. I currently pan around to get that result or sometimes I use QGIS that has a specific tool for the "download within limits" procedure I describe. But QGIS frequently freezes during the downloading from wms servers. I am not sure though if its a QGIS problem or server problem or my machine is not powerful enough.

steveFitz

230 post(s)
#31-Jan-19 06:34

Sorry geozap, I forgot to mention that I couldn't get the WMS to work in Manifold in this case. Usually I would do what you suggest (more or less). I either needed a Make Image tool in M9 or a WMS that worked in M8.

I won't ask too much about QGIS (for obvious reasons) but I couldn't find a way to save an g'refed copy of a WMS image. I'll look at 'download within limits' and see if that can help. I briefly tried GRASS GIS but

geozap124 post(s)
#31-Jan-19 06:39

https://gis.stackexchange.com/questions/190927/save-a-wms-layer-on-your-hard-drive-via-qgis

Manifold always opens fine the tiffs exported this way.

But it works only for wms servers. Not openlayers layers (google etc). I don't know if manifold could allow to download this way from google/bing etc, for copyright reasons.

steveFitz

230 post(s)
#31-Jan-19 08:29

https://gis.stackexchange.com/questions/190927/save-a-wms-layer-on-your-hard-drive-via-qgis

I tried the "right-click-save-as" way a few times even on different versions of QGIS and only got a new folder with the name tifname.tif with a vrs file in it.

geozap124 post(s)
#31-Jan-19 09:55

Can't try it now myself, but try these settings: Output mode:Rendered image Create VRT:Unchecked.

lionel

560 post(s)
#02-Feb-19 10:28

I Want to georeference a raster image using georeferenced background.

In mf8 i have georeference tool but ISI driver dont work (read Adam answer for my récent post)

In mfd9 i have access to osm georeference raster but i dont have in mfd9 the 2 tools available In mfd8 call

--- make image

--- georegister image

Capture screen can't be a workaround because i loose projection metadata

This 2 tools are missing in mfd9 so we need a SQL that convert tiles/vector to raster. And a way to reogister a raster

There is copyright on osm ? Strange...

Regard's


join image

"Because my dad promised me" ( interstellar ) but blackhole don't exist

best hardware with no ads focus on quality features price like manifold see xiaomi

KlausDE

6,283 post(s)
#02-Feb-19 11:15

I played around with the table of tiles downloaded with a cached WMS server. I managed to create an rtree index of x_y_tiles without error but the image didn't show up.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.