I just tried to set up an alias for MapGuide / Infrastructure Mapserver 2013. I tried a few different UNC path options (for instance with concluding backslash) but no - it just didn't work. Finally I found my mistake - just the UNC path for the share is not sufficient. I had to add a folder to get it to work.
Does not work:
\\bla.net\fachappli$\MG_DATEN (>> just the share)
Does work:
\\bla.net\fachappli$\MG_DATEN\Raster (share and subfolder)
Monday, 10 August 2015
Friday, 7 August 2015
Guest user/role - strange issue #2, solved
As mentioned yesterday we encountered a strange issue related to guest users/roles. Basically it seemed that it is not possible to create a new feature (no matter for which feature class) when working with an guest user/role in our job enabled LandManagement industry model. Instead my colleague got an error message regarding a missing spatial index. Confusing was, that it seemed to work when using a Map-Admin user. Further confusion was caused by the fact that when working directly on the data user the problem did not occur either. When I performed a test on my computer I was not able to reproduce the issue at all.
As it turns out our testing was not so comprehensive as it should have been in the first place and with hindsight the behaviour we observed can be explained.
Culprit seems to be a setting in Map's Global Enterprise Industry Model options (setting is replicated in IM options) : "Vicinity For Digitising Points [m] "
If "Vicinity For Digitising Points [m] " is turned on we get the error message, otherwise we don't. The setting itself is probably not to blame - we actually misunderstood the meaning of the option and can now safely turn it off. I think the option will cause Map to look through all point feature classes and if one of them doesn't have a spatial index one will get the error message.....
The issue is not related to topologies or guest user or non Map-Admin user. As we used different Map users and different industry models (data or guest user) during testing the aformentioned option was not uniformly set, caused therefore different results.
Map 2013, SP2
As it turns out our testing was not so comprehensive as it should have been in the first place and with hindsight the behaviour we observed can be explained.
Culprit seems to be a setting in Map's Global Enterprise Industry Model options (setting is replicated in IM options) : "Vicinity For Digitising Points [m] "
If "Vicinity For Digitising Points [m] " is turned on we get the error message, otherwise we don't. The setting itself is probably not to blame - we actually misunderstood the meaning of the option and can now safely turn it off. I think the option will cause Map to look through all point feature classes and if one of them doesn't have a spatial index one will get the error message.....
The issue is not related to topologies or guest user or non Map-Admin user. As we used different Map users and different industry models (data or guest user) during testing the aformentioned option was not uniformly set, caused therefore different results.
Map 2013, SP2
Thursday, 6 August 2015
Guest user/role - strange issues
We had two strange issues in AutoCAD Map related to guest users/roles (SecurityAdmin). Complexity is raised by the fact that we also have an job-enabled industry model and a topology.
Issue #1
Map crashed when we deleted a feature in "Live" state (from a certain feature class beloging to an area-topology) when using a guest user/role (SecurityAdmin).
The feature actually got deleted - the issue was the crash.
CER report and Map log file contained the following piece of information:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Autodesk.Map.IM.Data.FeatureClass.GetChildrenFeatureIDs(IEnumerable`1 fids, HashMap`2 parentToChildren, Int32 depth, Boolean geometryFeaturesOnly)
bei Autodesk.Map.IM.Map.MapLogicImpl.RegenenerateFromModificationLog(Boolean regenerate)
bei Autodesk.Map.IM.Map.MapLogicImpl.MapDrawBurstDisposed(MapDrawBurstImpl burst, Boolean disposing)
bei Autodesk.Map.IM.Map.MapDrawBurst.Dispose()
bei Autodesk.Map.IM.Map.MapLogicImpl.DeleteFidTidArray(FidTidArray fta)
bei Autodesk.Map.IM.Map.MapLogicImpl.DeleteFeatures(String prompt)
bei Autodesk.Map.IM.Map.MapDocument.Delete_Interaction(Object sender, InteractionEventArgs e)
bei Autodesk.Map.IM.CommandRegistry.API.BaseCommandRegistry.Execute(String globalName, CommandExecute commandCallback, Boolean async, Document document, Object[] args)
bei Autodesk.Map.IM.CommandRegistry.API.BaseCommandRegistry.Execute(String globalName, Boolean async, Object[] args)
This issue has been resolved by re-creating the Guest-user/role in SecurityAdmin.
Issue #2
It was not possible to create a new feature (for a certain feature class beloging to an area-topology) in an "open" job when:
- using a guest user/role (Security Admin)
and
- using a non-Admin Map user.
We got the following error message :
Vorgang ist fehlgeschlagen, da ein Spatial-Index nicht in der Fachschale vorhanden ist.
(Industry model does not have a spatial index. )
No message appeared in Map's log file.
There was no issue creating the feature when logging in with a Map user who has Admin permission (Map-Admin, not Windows or Oracle Admin).
My colleague showed me the issue on his machine yesterday. He had done several tests over the last two days. The issue always occured whilst testing. Today I did a test on my machine and the issue did not occur. Then my colleague did test on his machine again and got the same result.. We tried to find out if the issue is related to a certain workflow but to no avail.
Map 2013, SP2
Issue #1
Map crashed when we deleted a feature in "Live" state (from a certain feature class beloging to an area-topology) when using a guest user/role (SecurityAdmin).
The feature actually got deleted - the issue was the crash.
CER report and Map log file contained the following piece of information:
System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei Autodesk.Map.IM.Data.FeatureClass.GetChildrenFeatureIDs(IEnumerable`1 fids, HashMap`2 parentToChildren, Int32 depth, Boolean geometryFeaturesOnly)
bei Autodesk.Map.IM.Map.MapLogicImpl.RegenenerateFromModificationLog(Boolean regenerate)
bei Autodesk.Map.IM.Map.MapLogicImpl.MapDrawBurstDisposed(MapDrawBurstImpl burst, Boolean disposing)
bei Autodesk.Map.IM.Map.MapDrawBurst.Dispose()
bei Autodesk.Map.IM.Map.MapLogicImpl.DeleteFidTidArray(FidTidArray fta)
bei Autodesk.Map.IM.Map.MapLogicImpl.DeleteFeatures(String prompt)
bei Autodesk.Map.IM.Map.MapDocument.Delete_Interaction(Object sender, InteractionEventArgs e)
bei Autodesk.Map.IM.CommandRegistry.API.BaseCommandRegistry.Execute(String globalName, CommandExecute commandCallback, Boolean async, Document document, Object[] args)
bei Autodesk.Map.IM.CommandRegistry.API.BaseCommandRegistry.Execute(String globalName, Boolean async, Object[] args)
This issue has been resolved by re-creating the Guest-user/role in SecurityAdmin.
Issue #2
It was not possible to create a new feature (for a certain feature class beloging to an area-topology) in an "open" job when:
- using a guest user/role (Security Admin)
and
- using a non-Admin Map user.
We got the following error message :
Vorgang ist fehlgeschlagen, da ein Spatial-Index nicht in der Fachschale vorhanden ist.
(Industry model does not have a spatial index. )
No message appeared in Map's log file.
There was no issue creating the feature when logging in with a Map user who has Admin permission (Map-Admin, not Windows or Oracle Admin).
My colleague showed me the issue on his machine yesterday. He had done several tests over the last two days. The issue always occured whilst testing. Today I did a test on my machine and the issue did not occur. Then my colleague did test on his machine again and got the same result.. We tried to find out if the issue is related to a certain workflow but to no avail.
Map 2013, SP2
Tuesday, 14 July 2015
Map workflow - separate files for specific area
Situation: ca 7000 tiled raster files in one folder but only a subset for a specific area is required, SHP file containing tiles and filenames and SHP file with area of interest available
workflow:
1 - load both SHP files into Map
2 - spatial query to select tiles for area of interest
3 - export attribute data for selection
4 - open attribute data in Excel
5 - extract exact filename with Excel and add addtional parameters (DOS commands), as result you need something like this:
6 - copy result into new textfile, save as BAT file into folder with raster files and execute
What happens if you do not have a SHP file containg tiles and filenames?
This might be an option to create one with Map:
- load raster files into Map (command: _mapiinsert), choose option to show frame only (do not load thousands of raster files, only let Map display the frames)
- add AutoCAD layer with image frames to DisplayManager (query current drawing)
- add a label to the newly add layer, choose ".IMAGENAME" as label text
- export as SHP (command: _mapexport), export option "Text" : you will get a Point SHP with text insertion points as points and label text as attribute
- use point shape for spatial query
![]() |
raster tiles (green), area of interest (blue) |
workflow:
1 - load both SHP files into Map
2 - spatial query to select tiles for area of interest
![]() |
raster tiles for area of interest |
3 - export attribute data for selection
![]() |
shp with tiles (selection for area of interest) - export attribute data (filenames) |
4 - open attribute data in Excel
5 - extract exact filename with Excel and add addtional parameters (DOS commands), as result you need something like this:
...
|
![]() |
further processing in Excel |
6 - copy result into new textfile, save as BAT file into folder with raster files and execute
What happens if you do not have a SHP file containg tiles and filenames?
This might be an option to create one with Map:
- load raster files into Map (command: _mapiinsert), choose option to show frame only (do not load thousands of raster files, only let Map display the frames)
![]() |
_mapiinsert - show frames only |
- add AutoCAD layer with image frames to DisplayManager (query current drawing)
- add a label to the newly add layer, choose ".IMAGENAME" as label text
![]() |
label added to iamge frames - path to file is used as text |
- export as SHP (command: _mapexport), export option "Text" : you will get a Point SHP with text insertion points as points and label text as attribute
- use point shape for spatial query
Labels:
display manager,
export,
files,
image,
label,
Map,
raster,
shp,
spatial query,
workflow
Friday, 10 July 2015
MapGuide / AIMS - show number of sessions
As shown in Jackie's blog one can easily count the number of current sessions. I put such a counter on our internal web site where we keep links to different web interfaces and scripts related to our AIMS/MapGuide installations:
The script is written in PHP:
The vaw_settings.php file contains only the path to MapGuide session repository ($pathSessionRepository).
The script for counting current sessions is called from within another PHP script which runs on one of the AIMS servers. It also calls the slightly modified version of the script on the remote server:
Depending on whether the script runs locally or remotely it needs to be modified slightly (see comments in scripts) and the way the script is called varies as well (relative path vs. complete URL, include vs. file_get_contents).
AIMS/MapGuide 2013
The script is written in PHP:
<?php
// for remote server
//
// (1) INLCUDE ../vaw_settings.php;
//
// for local server
//
// (1) INLCUDE Verweis mit ./vaw_settings.php;
//
include './vaw_settings.php';
$fi = new FilesystemIterator($pathSessionRepository, FilesystemIterator::SKIP_DOTS);
//
$number = (iterator_count($fi)-1)/2 ;
// for remote server
//
// (2) echo $number;
//
// for local server
//
// (2) return $number;
//
return $number;
?>
The vaw_settings.php file contains only the path to MapGuide session repository ($pathSessionRepository).
The script for counting current sessions is called from within another PHP script which runs on one of the AIMS servers. It also calls the slightly modified version of the script on the remote server:
...
$script_number_users = 'misc/count_logged_users.php';
...
//local server
//only relative path to script
$request_url = $script_number_users;
echo "# of users logged in ($label_server1):____".include($request_url).".";
//remote server
//complete url
$request_url = $basis_url_server3.$url_vaw_scripte.$script_number_users;
echo "# of users logged in ($label_server3):____".file_get_contents($request_url).".";
Depending on whether the script runs locally or remotely it needs to be modified slightly (see comments in scripts) and the way the script is called varies as well (relative path vs. complete URL, include vs. file_get_contents).
AIMS/MapGuide 2013
Thursday, 9 July 2015
create view with unique FID
We have an Oracle view where no unique FID can be retrieved. Without an unique FID Map will not display the data in a form (industry model).
In our situation we only need a unique ID for the sake of the FID requirement by Map. To generate such a unique ID we chose the following approach:
- the view is wrapped by a select statement which includes rownum:
As we need to show the data of the view only occasionally performance is not a major concern here.
Map 2013, SP2
In our situation we only need a unique ID for the sake of the FID requirement by Map. To generate such a unique ID we chose the following approach:
- the view is wrapped by a select statement which includes rownum:
create or replace view my_view as select
rownum fid, t.* from
(
... view definition ...
) t;
As we need to show the data of the view only occasionally performance is not a major concern here.
Map 2013, SP2
Tuesday, 30 June 2015
MapGuide / AIMS - performance, file access
We run AIMS on virtualized W2008R2 machines with 6 GB RAM. Most data displayed as maps comes directly from Oracle Spatial. Only for one job enabled Map industry model we decided to export 40+ feature classes and views to an SDF file. File size is roughly 200MB.
In order to speed things up I created a RAM Disk on the server and did some performance tests:
- hard disk access (read/write) was already much better then on my physical machine
- depending on RAM disk driver and test performed read access was faster by up to factor 6 compared to hard disk access
Surprisingly moving the SDF file to the RAM disk did not help improving performance in AIMS/MapGuide.
Conclusion seems to be that W2008R2 has already cached the SDF file and no further improvement is possible here. As the SDF file is used in all web mapping projects and layers based on file are visible by default I assume that the file will be cached all the time.
Here are a few screenshots related to the testing:
- hard disk performance, local machine:
- hard disk performance, virtualized 2008r2 server
- ram disk performance, local machine (imdisk)
- ram disk performance, w 2008r2 (softperfect)
- AIMS/MapGuide performance test with sdf based map - sdf file on disk on virtualized w2008r2 server
- AIMS/MapGuide performance test with sdf based map - sdf file on ram disk on virtualized w2008r2 server
AIMS 2013
In order to speed things up I created a RAM Disk on the server and did some performance tests:
- hard disk access (read/write) was already much better then on my physical machine
- depending on RAM disk driver and test performed read access was faster by up to factor 6 compared to hard disk access
Surprisingly moving the SDF file to the RAM disk did not help improving performance in AIMS/MapGuide.
Conclusion seems to be that W2008R2 has already cached the SDF file and no further improvement is possible here. As the SDF file is used in all web mapping projects and layers based on file are visible by default I assume that the file will be cached all the time.
Here are a few screenshots related to the testing:
- hard disk performance, local machine:
- hard disk performance, virtualized 2008r2 server
- ram disk performance, local machine (imdisk)
- ram disk performance, w 2008r2 (softperfect)
- AIMS/MapGuide performance test with sdf based map - sdf file on disk on virtualized w2008r2 server
- AIMS/MapGuide performance test with sdf based map - sdf file on ram disk on virtualized w2008r2 server
AIMS 2013
Subscribe to:
Posts (Atom)