Tuesday 25 November 2014

dynamic feature labels not always displayed

We noticed that dynamic labels for FDO features are not always displayed. Depending on other map features (points and text) dynamic labels are generated or not. Here is one example: the blue text is a dynamically generated label for a grid cell:

dynamic label in centre of map.....
If the map extent is slightly different or additional layers are turned on the dynamic label disappears:
...disappears when other layers become visible

Unfortunately there is no "switch" to force AIMS to generate the label nonetheless. But Autodesk support kindly provided a more detailed explanation about what is going on and how to get around it:

"AIMS/Map: labels are not visible if point feature or other labels are at the same place
You miss labels coming from FDO Feature stylisation
 
Cause 
In general labels are visible always on top of the graphical objects, but labels are not visible if point features are at the same place
  
Solution 
As a workaround you can change the following settings in the .layer file of Map 3D or in the .xml of AIMS
• Save the FDO layer for point features class as .layer file
• Open the .layer file with notepad(++)
• Change following setting in the .layer file from True to False
                    <AddToExclusionRegion>false</AddToExclusionRegion>"


Map 2013, SP2

Thursday 20 November 2014

AIMS / MapGuide - scripts for map maintenance

I have written a small script which helps with "map maintenance". We have 50+ maps - nearly all of them derived from a map template. From time to time we need to add new layers to our maps - a quite awkward and time consuming process with MapGuide Studio. The script allows to insert layers and groups into all maps. Drawing order of layers and position of the group in the legend tree can be controlled (by referencing an existing layer or group). I have used the script a couple of times now it seems to work well. The script is far from being perfect - despite it might be helpful to others.
If you are interested let me know - I do not want to provide the scripts as simple download (yet) as it is "work in progress" and text/comments/variable names 
are in German only. I'm interested in collaborating with anyone else out there wanting to improve MapGuide maintenance through scripting (PHP). Just drop me a line: robert.fritz - at - win.ch

Wednesday 19 November 2014

MapGuide / AIMS performance

Most of the data we publish to our intranet web gis (based on AIMS 2013) comes from Oracle via FDO Topobase provider. For performance reasons we have created an SDF file for the most often used base data - containing 30+ tables and 700'000 features. To my surprise the SDF file is not as fast as I expected. By changing the default value "DataConnectionPoolExcludedProviders" performance increased noticable.

By default SDF files are excldued from ConnectionPooling:
 
DataConnectionPoolExcludedProviders = OSGeo.SDF,OSGeo.SHP

By uncommenting the line and restarting AIMS things got better:

#DataConnectionPoolExcludedProviders = OSGeo.SDF,OSGeo.SHP

This has been mentioned before - but somehow I didn't know it. Here is an older reference:

http://zacster.blogspot.ch/2008/10/mapguide-performance-tips.html


In the next few days I will look into SQLite files as an alternative to SDF. A first test seems to be promising - SQLite file was much faster than SDF.

Map 2013, SP2

Monday 17 November 2014

ORA-28031 maximum of 148 roles exceeded.

For some features in Map-Administrator (such as deleting an industry model) you need to log in with an Oracle user who has elevated privileges (DBA) compared to MAPSYS. We do not use Oracles SYSTEM user but have one with nearly DBA privileges called GISDBA. Recently we got the following error message when trying to log in with the user GISDBA:

ORA-28031 maximum of 148 roles exceeded.

When you create "guest users" with Security Administrator multiple roles are being created and two roles per guest user are attached to GISDBA.  We have many industry models (30+) and usually we create at least two guest users per industry model (one is read only, the second one allows data manipulation - depending on the complexity of the industry model we have more then 2 guest users).

But there is a limit on how many roles can be attached to one Oracle user - and we have hit the limit. The way to get around this issue is to create a second GISDBA user and to transfer some of the roles. 

select count(granted_role) from USER_ROLE_PRIVS where granted_role like 'TB%';
COUNT(GRANTED_ROLE)
-------------------
76


The example above shows that one GISDBA user now has 76 roles attached which are related to guest users.


Map 2013, SP2