Tuesday, June 16, 2015

Reset Logical Topology Map3D Industry Model

 /// <summary>
        /// Reset the topology of the industry model currently connected to.
        /// </summary>
        public static void ResetTopology()
        {
            var application = Application.Active;
            var connection = application.Documents.Active.Connection;

            using (var ma = new Topobase.LogicalTopology.Maintainance(connection))
            {
                connection.Open();
                //Make sure there are topologies to clear
                if (connection.Topologies != null)
                {
                    for (int i = 0; i < connection.Topologies.Count; i++)
                    {
                        //Check the type of the topologies before clearing them.
                        //Make sure they are logical topologies and not area
   var topology =     
   connection.Topologies.Get(connection.Topologies[i].Name);
                        var logicalToplogy = topology as LogicalTopology;
                        //Clear topology attached to the industry model
                        ma.ClearTopology(logicalToplogy, null);
                        //Initialize topolgy of the current industy model
                        ma.InitializeTopology(logicalToplogy, null);
                    }
                }
            }
        }

Monday, March 30, 2015

FME DWG Text 2 RASTER

First you need to TXTEXP all your text within autocad. After you ran the command you will end up with lines on layer 0.

Then you can run this workbench to transform your data from autocad vector data to any raster image.

Enjoy!

Download Workbench


Tuesday, December 2, 2014

MAP3D (Topobase) can't split linestring due to duplicate points

Apparently if you look at the geometry using the API (feature) the collection of the linestring has double starting points and double endpoints.

A validation on oracle doesn't detect the problem in the collection of the linestring.

Performing a spatial function, either rectify or a simplify, on the geometry will solve the problem.

select * from tb_job where name = 'Aansluiting 67 G split';
exec job3.setjob(45);
select * from in_geo_segment where FID = 43141;
update in_geo_segment set geom = SDO_UTIL.SIMPLIFY(geom,0.01,0.005) where fid = 43141;
commit;

select * from tb_job where name = 'Aansluiting 108 G split';
exec job3.setjob(48);
select * from in_geo_segment where FID = 46655;
update in_geo_segment set geom = SDO_UTIL.SIMPLIFY(geom,0.01,0.005) where fid = 46655;
update in_geo_segment set geom = SDO_UTIL.SIMPLIFY(geom,0.01,0.005) where fid = 46651;
update in_geo_segment set geom = SDO_UTIL.SIMPLIFY(geom,0.01,0.005) where fid = 47169;
commit;

Tuesday, July 29, 2014

The program can't start because WMVCore.DLL is missing from your computer

Today I had this error on my windows server 2008 r2 install when trying to launch camtasia studio on the server.

This youtube video explained me how to resolve this problem.

https://www.youtube.com/watch?v=QoQqs0SiS8w

Monday, July 14, 2014

FME : Validate the attribute names of a feature

Goal : Verify the attribute names of a feature layer in a dataset using FME.

My dataset source is an sdf but this can be done with any reader source FME can read.
I had to use a few transformers to filter the attribute names of the feature layer.

1. First of all you need to use a Sampler to make sure you end up with one single feature instead of the complete dataset.

2. Once you filtered a single feature you use an attributeexploder to aquire the feature's fme attribute names.


3. Next I added a Tester to verify the expected attribute names.

4. I added the result to a list using the listbuilder

5. I used a ListCounter to get the amount of passed tests.


6. I will verify the amount of passed tests against the amount of expected attribute names within the dataset.

7. The failed results are written to a text file using a TEXTWRITER



Voila, thats how you verify whether the expected amount of columns are part of your dataset using FME.

The result can be downloaded here