Skip to main content

I received a sample data file from a client who wanted me to convert all their files from CGI's OMS .gis extension or called the M3i format, data is for Electric utility.

 

Though you can open the file in Notepad++, I tried to read it as well using Json Reader to be able to extract the attributes and geometry, but it seems it's hard to interpret the data structure from inside, to be able to parse it..

 

I also found this Safe webinar slides (here) talking about this format, and it looks like t's supported FME format though

here's a snippet of how this file looks like:

GIS M3I standard data, version 1
621295625593D702{GEOMETRY{SYMBOL{default;361368.971591387;194906.787360248;1;178
621295625593D702{CONNECTIVITY{NODE{621295625593D702C1;621295625593D702C2
621295625593D702{ATTRIBUTE{EQUIP_TYPE{ELBOW
621295625593D702{ATTRIBUTE{STATUS{C
621295625593D702{ATTRIBUTE{PHASE{B
621295625593D702{ATTRIBUTE{ON_MAIN_LINE{T
621295625593D702{ATTRIBUTE{DISPLAY_TEXT{\z3025J to 2433JB
621295625593D702{ATTRIBUTE{TOOL_TIP{3025J to 2433JB
621295625593D702{GEOMETRY{LAYER{EQUIPMENT
621295625593C20{GEOMETRY{LINE{electric;361372.714;194906.862;361371.244;194906.722;361368.971591387;194906.787360248
621295625593C20{CONNECTIVITY{NODE{621295D269C1;621295625593D702C1
621295625593C20{ATTRIBUTE{CONDUCTOR_TYPE{UG_PRIMARY
621295625593C20{ATTRIBUTE{CONDUCTOR_MATERIAL{CU
621295625593C20{ATTRIBUTE{CONDUCTOR_SIZE{#2
621295625593C20{ATTRIBUTE{PHASE{B
621295625593C20{ATTRIBUTE{ON_MAIN_LINE{F
621295625593C20{ATTRIBUTE{TOOL_TIP{B Knoble-3
621295625593C20{GEOMETRY{LAYER{CONDUCTOR
621295625481D702{GEOMETRY{SYMBOL{default;361379.541623473;194907.660007895;1;19
621295625481D702{CONNECTIVITY{NODE{621295625481D702C1;621295625481D702C2
621295625481D702{ATTRIBUTE{EQUIP_TYPE{ELBOW
621295625481D702{ATTRIBUTE{STATUS{C
621295625481D702{ATTRIBUTE{PHASE{ABC
621295625481D702{ATTRIBUTE{ON_MAIN_LINE{T
621295625481D702{ATTRIBUTE{DISPLAY_TEXT{\z3025J to 3725J
621295625481D702{ATTRIBUTE{TOOL_TIP{3025J to 3725J
621295625481D702{GEOMETRY{LAYER{EQUIPMENT
621295625481C20{GEOMETRY{LINE{electric;361372.714;194906.862;361374.167;194905.786;361379.541623473;194907.660007895
621295625481C20{CONNECTIVITY{NODE{621295D269C1;621295625481D702C1
621295625481C20{ATTRIBUTE{CONDUCTOR_TYPE{UG_PRIMARY
621295625481C20{ATTRIBUTE{CONDUCTOR_MATERIAL{CU
621295625481C20{ATTRIBUTE{CONDUCTOR_SIZE{1/0
621295625481C20{ATTRIBUTE{PHASE{ABC
621295625481C20{ATTRIBUTE{ON_MAIN_LINE{T
621295625481C20{ATTRIBUTE{TOOL_TIP{ABC Knoble-3
621295625481C20{GEOMETRY{LAYER{CONDUCTOR
621295625484.1D702{GEOMETRY{SYMBOL{default;361365.478948946;194908.104856725;1;178
621295625484.1D702{CONNECTIVITY{NODE{621295625484.1D702C1;621295625484.1D702C2
621295625484.1D702{ATTRIBUTE{EQUIP_TYPE{ELBOW
621295625484.1D702{ATTRIBUTE{STATUS{C
621295625484.1D702{ATTRIBUTE{PHASE{ABC
621295625484.1D702{ATTRIBUTE{ON_MAIN_LINE{T
621295625484.1D702{ATTRIBUTE{DISPLAY_TEXT{\z3025J to 2629P
621295625484.1D702{ATTRIBUTE{TOOL_TIP{3025J to 2629P
621295625484.1D702{GEOMETRY{LAYER{EQUIPMENT
621295625484.1C20{GEOMETRY{LINE{electric;361372.714;194906.862;361371.142;194906.931;361369.076;194908.004;361366.187;194908.085;361365.478948946;194908.104856725
621295625484.1C20{CONNECTIVITY{NODE{621295D269C1;621295625484.1D702C1
621295625484.1C20{ATTRIBUTE{CONDUCTOR_TYPE{UG_PRIMARY
621295625484.1C20{ATTRIBUTE{CONDUCTOR_MATERIAL{CU
621295625484.1C20{ATTRIBUTE{CONDUCTOR_SIZE{1/0
621295625484.1C20{ATTRIBUTE{PHASE{ABC
621295625484.1C20{ATTRIBUTE{ON_MAIN_LINE{T
621295625484.1C20{ATTRIBUTE{TOOL_TIP{ABC Knoble-3
621295625484.1C20{GEOMETRY{LAYER{CONDUCTOR

Any idea?

CGI PragmaLine (OMS) M3I .gis is not mentioned in the Formats Matrix.

Also the data you show is most definitely not JSON. Instead it contains text lines with 4 {-separated fields. The first field seems to be an ID, the second field a category, the third field something depending on the second field, and the forth field contains a value, somtimes with several ;-separated subvalues.

The most easy way seems to be to read the data as a text file, process each text line separately (depending on the category), and join the results by ID.

m3i_sample


THANKS SO MUCH @geomancer​ !!, that really did solve my issue.

Appreciate your time and effort!

 


Hi @samisnunu​ , you're most welcome, I'm glad I could help you.


It is probably faster to use an InlineQuerier instead of multiple FeatureJoiners, see below. Unfortunately this will make the workflow less clear.

I also made some changes to the way the WKT strings are calulated.

m3i_sample_IQ


This is again an awesome improvement, I confirm it is faster in processing now...

I ran the workspace against one of the files m3i files, and you can see the result in the snapshot below..

Next is I have to figure out the custom coordinate system used to re-project the data correctly..,

but again thanks so much @geomancer​ Snapshot 


Hi @samisnunu​ , nice to see the results of the workspace on real data!

I hope your client can tell you the approximate location of the data. With that information a site like http://projfinder.com/ can help you to determine the coordinate system that was used.

Good luck!


Reply