We want to use a MapGuide map in an OpenLayers based web mapping application. Whilst checking the two options for calling MapGuide I noticed the differences between GETMAPIMAGE and GETDYNAMICMAPOVERLAYIMAGE.
GETDYNAMICMAPOVERLAYIMAGE
- creates a transparent background
- requires a session id
GETMAPIMAGE
- doesn't support transparent background but map background color can be set transparent <BackgroundColor>00ffffff</BackgroundColor>
- allows username/password or session id
We tried WMS as well but MapGuide (AIMS 2013) as WMS server is not great - mainly perfomance is not sufficient. Will do another performance with AIMS 2017 soon.
Wednesday, 23 November 2016
Monday, 19 September 2016
AIMS 2017 - new error message
After updating from AIMS 2013 to AIMS 2017 no raster images were shown. Any preview in Studio triggered the following error message in the log file:
<2016-09-07T08:33:35> 3752 Ajax Viewer 10.99.66.114 Administrator
Error: Stilisierung von folgendem Layer fehlgeschlagen: Luftbild_1pro
Ausnahmefehler in FDO-Komponente aufgetreten.
Ausnahmefehler in FDO-Komponente aufgetreten.
'FdoATILSession::GetImage': Funktion kann aufgrund eines ungültigen Wertes für Eingabeparameter 'fileDescriptor' nicht ausgeführt werden. (Ursache: , grundlegende Ursache: 'FdoATILSession::GetImage': Funktion kann aufgrund eines ungültigen Wertes für Eingabeparameter 'fileDescriptor' nicht ausgeführt werden. )
StackTrace:
- MgMappingUtil.StylizeLayers() Zeile 899 Datei e:\build\2017\re_ims2017_46_1-6376417\ent\os\server\src\services\mapping\MappingUtil.cpp
This message was new to me and hadn't occurred with AIMS 2013.
Also, "Testing connection" always returned "OK" for our raster file data source. The raster file data source uses an ALIAS which points to a shared network drive.
Problem was, that AIMS 2017 was running under local user account. In order to access the network drive AIMS service needs to run under different user account.
AIMS 2017, SP1
<2016-09-07T08:33:35> 3752 Ajax Viewer 10.99.66.114 Administrator
Error: Stilisierung von folgendem Layer fehlgeschlagen: Luftbild_1pro
Ausnahmefehler in FDO-Komponente aufgetreten.
Ausnahmefehler in FDO-Komponente aufgetreten.
'FdoATILSession::GetImage': Funktion kann aufgrund eines ungültigen Wertes für Eingabeparameter 'fileDescriptor' nicht ausgeführt werden. (Ursache: , grundlegende Ursache: 'FdoATILSession::GetImage': Funktion kann aufgrund eines ungültigen Wertes für Eingabeparameter 'fileDescriptor' nicht ausgeführt werden. )
StackTrace:
- MgMappingUtil.StylizeLayers() Zeile 899 Datei e:\build\2017\re_ims2017_46_1-6376417\ent\os\server\src\services\mapping\MappingUtil.cpp
This message was new to me and hadn't occurred with AIMS 2013.
Also, "Testing connection" always returned "OK" for our raster file data source. The raster file data source uses an ALIAS which points to a shared network drive.
Problem was, that AIMS 2017 was running under local user account. In order to access the network drive AIMS service needs to run under different user account.
AIMS 2017, SP1
Monday, 12 September 2016
Oracle ANSI JOIN syntax improves peformance
Using ANSI JOIN syntax instead of Oracle Join snytax is recommended - see here:
http://www.orafaq.com/node/2618
We found out the hard way:
- a third party application issues simple but nested SQL statements against Map IM views
- for some views we noticed that the query ran for a long time and generated a time out
- just by changing the JOIN syntax to ANSI join the issue was resolved
Map 2017
http://www.orafaq.com/node/2618
We found out the hard way:
- a third party application issues simple but nested SQL statements against Map IM views
- for some views we noticed that the query ran for a long time and generated a time out
- just by changing the JOIN syntax to ANSI join the issue was resolved
Map 2017
Friday, 9 September 2016
AIMS GeoRest - Update 2013 to 2017
I installed AIMS 2017 on our test server. To get Georest extension running again the following steps were required:
(1) change path for virtual folder "rest" to ..Autodesk\Autodesk Infrastructure Web Server Extension 2017\www\GeoREST\bin
(2) re-create Wildcard Module Mapping for GeoRest_ISAPI.dll
(3) copy all GeoRest configuration files from old installation into ..Autodesk Infrastructure Web Server Extension 2017\www\GeoREST\conf
(4) change Port number in conf files (old port number: 2801, new port number: 2811)
Restart IIS, test, done.
AIMS 2017,
(1) change path for virtual folder "rest" to ..Autodesk\Autodesk Infrastructure Web Server Extension 2017\www\GeoREST\bin
(2) re-create Wildcard Module Mapping for GeoRest_ISAPI.dll
(3) copy all GeoRest configuration files from old installation into ..Autodesk Infrastructure Web Server Extension 2017\www\GeoREST\conf
(4) change Port number in conf files (old port number: 2801, new port number: 2811)
Restart IIS, test, done.
AIMS 2017,
Tuesday, 23 August 2016
Python - update georeferencing information in multiple files
You need to install GDAL Python bindings first.
https://pythongisandstuff.wordpress.com/2011/07/07/installing-gdal-and-ogr-for-python-on-windows/
Here is a basic script as template:
https://pythongisandstuff.wordpress.com/2011/07/07/installing-gdal-and-ogr-for-python-on-windows/
Here is a basic script as template:
import os
import fnmatch
from datetime import date
from osgeo import gdal
from gdalconst import *
# logfile-path
logfile = "c:/temp/geotifheader_update.log"
#path to GeoTIFs
tif_filefolder = "S:/MG_DATEN/Rasterdaten"
#shift for all images - we just add a fixed shift to all images
shift_x = 2000000.950
shift_y = 999999.800
# get all TIF files in folder, including subfolders
def list_files(dir):
r = []
for root, dirs, files in os.walk(dir):
#for name in files:
for name in fnmatch.filter(files, "*.tif"):
r.append(os.path.join(root, name))
return r
#write message to log file
def writelog(message):
with open(logfile, 'a') as myfile:
myfile.write(message)
#init log file
def initlog():
with open(logfile, 'a') as myfile:
myfile.write(str(date.today())+"\n")
#update georeferencing information for each image
def setHeader(filepath):
dataset = gdal.OpenEx(filepath, GA_Update)
geotransform = dataset.GetGeoTransform()
if not geotransform is None:
print "**file**: ", filepath
print 'Origin = (', geotransform[0], ',', geotransform[3], ')'
print 'Pixel Size = (', geotransform[1], ',', geotransform[5], ')'
ulx = geotransform[0];
uly = geotransform[3];
#simple check whether image should be updated or not
if (ulx > 1000000 or ulx == 0 or uly > 1000000 or uly == 0):
m = "current insertion point out of bounds: " + str(ulx) + "," + str(uly)+"\n"
print m
writelog(m)
else:
ulx = ulx + shift_x
uly = uly + shift_y
lrx = ulx + (dataset.RasterXSize * geotransform[1])
lry = uly + (dataset.RasterYSize * geotransform[5])
gt = [ulx, (lrx - ulx) / dataset.RasterXSize, 0, uly, 0, (lry - uly) / dataset.RasterYSize]
dataset.SetGeoTransform(gt)
m = "image has been updated.\n"
print m
writelog(m)
else:
m = "not a geotiff.\n "
print m
writelog(m)
files = list_files(tif_filefolder)
initlog()
for file in files:
writelog("-----------------------\n")
writelog(file+"\n")
setHeader(file)
writelog("-----------------------\n")
'''
for single file:
setHeader("S:/GIS/DTMAV/Relief/relief_dtmav30.tif")
'''
# https://gis.uster.ch/dokumentation/datenkonvertierung/gdal-tools
# set path=C:\Program Files\GDAL;C:\Python27
Thursday, 18 August 2016
MapGuide/AIMS - modifying maps and layers as XML
Often I export MapGuide map definitions or layers as XML in order to add or remove content. Most often it is faster than using Studio. The modified XML file is uploaded with MapAgent and "SetResource". Specifically map definitions contain hundreds of layers and often layers need to be added or removed. I just realized that instead of deleting layers and uploading the map definition I can just put the layers in questions within XML comment tags and upload the file again. In case I have made a mistake and "deleted" a layer which I didn't want to delete I can go back to my XML file, remove the comment tags and upload the file again. Unfortunately the comments are filtered out when uploading - so when you save the map definition again as XML file from Studio all comments are gone.
By the way - when you put comments into Map layer definition files and open and save the DisplayModel with Map the comments are retained.
By the way - when you put comments into Map layer definition files and open and save the DisplayModel with Map the comments are retained.
</MapLayer>
-->
<MapLayer>
<Name>GR_Baum</Name>
<ResourceId>Library://FS_INFO/WT_GR_I/Layers/GR_Baumkataster/GR_Baum.LayerDefinition</ResourceId>
<Selectable>false</Selectable>
<ShowInLegend>true</ShowInLegend>
<LegendLabel>GR_Baum</LegendLabel>
<ExpandInLegend>false</ExpandInLegend>
<Visible>true</Visible>
<Group>GR_Baumkataster</Group>
</MapLayer>
<!--
<MapLayer>
<Name>SW_Projektperimeter</Name>
<ResourceId>Library://WMS_IN/IS/Layers/SW_Projektperimeter.LayerDefinition</ResourceId>
<Selectable>false</Selectable>
<ShowInLegend>true</ShowInLegend>
<LegendLabel>SW_Projektperimeter</LegendLabel>
<ExpandInLegend>false</ExpandInLegend>
<Visible>false</Visible>
<Group>Leitungskataster</Group>
</MapLayer>
-->
<MapLayer>
Saturday, 13 August 2016
Lost in translation - even worse....
Just created network deployment for Map 2017 and noticed that ReCap description hasn't changed much (see screenshot). If you do not speak german than you really miss out on a ridiculous translation.
link
![]() |
ReCap - "Realitätserfassung in einer Vorbereitungsumgebung" - good luck with that! |
Subscribe to:
Posts (Atom)