How to store micro-station element as PostGIS Geometry?

I need to store the MicroStation element geometry to PostGIS geometry column.

Already I have stored the element by using ST_GEomFromText option of postgis.But it requires fixed structure format of vertices.So i  iterate and convert Point3D array each x,y and z coordinates to string and pass this input for ST_GEomFromText.It'c consume more time for iterate and get the xyz coordinate string.Is any other method available for string microstaion element to postgis geomentry?

Microstaion Version :08.05.01.05

I try to store the microstation geometry from Vb.net Interop Microstaion application

Parents
  • Hi Rajarethinam,

    please be aware this is general developers and programming forum. I recommend to move your post to MicroStation Programming forum. To move existing discussion, use More > Move tool under your original post.

    Microstaion Version :08.05.01.05

    It is very old version, released 16 years ago. The problem is it's not certified for today Windows and also it does not support officially current development technologies (C++, NET etc.).

    I need to store the MicroStation element geometry to PostGIS geometry column.

    What geometry? It's very general question. MicroStation elements, even in the mentioned old version, span from simple line over line string, arcs, ellipses etc. to complex elements like complex shape, complex string or cells. And there are also more complicated elements like solids, SmartSolids, feature modeling objects etc.

    I try to store the microstation geometry from Vb.net Interop Microstaion application

    It's not the primary topic of this discussion, but how to you use VB.NET in MicroStation V8.5? It was not supported officially in this version (even when I remember some articles how to do it).

    But it requires fixed structure format of vertices.So i  iterate and convert Point3D array each x,y and z coordinates to string and pass this input for ST_GEomFromText.It'c consume more time for iterate and get the xyz coordinate string.

    I do not think it's right. Can you provide any benchmark and performance comparison? I have (at least) these objections:

    • To work with strings is always expensive operation regardless used language. But it can be done in a right way and a wrong way. Using what code do you create the string? And did you use some performance monitoring tool to ensure the code is efficient?
      Because SQL communication is text based, it will be always about building strings, regardless coordinates are formatted as TEXT or WKB (binary).
    • The whole chain from client to DB and back is long and complicated. Often a bottleneck is not how queries are created, because a code on client is much faster than communication and DB itself, but e.g. how data is committed to database (e.g. individual transactions vs recording in batch), so to focus on one individual step has to be justified by benchmarks to ensure this is the real bottleneck.
    • VB.NET + Interop will be always slow, because based on COM.
    Is any other method available for string microstaion element to postgis geomentry?

    Because you did not provide any details what "MicroStation geometry" is, it's hard to answer.

    It's always wise to check available frameworks, in this case e.g. NetTopologySuite.IO.PostGis, available as NuGet package, because it provides out of the box PostGIS connection functionality.

    I always recommend to do not use so old version, but to jump to current CONNECT Edition (or at least to V8i (SELECTseries 10)). MicroStation does not support GIS data and GIS databases, but at least newer versions are supported, certified for W10 and CONNECT Edition allows to use the latest software development technologies (new NET API, based on NET 4.6.2).

    As mentioned, OpenCities Map CONNECT Edition (Bentley Map successor) supports PostGIS as repository directly, so no development is necessary.

    With regards,

      Jan

Reply
  • Hi Rajarethinam,

    please be aware this is general developers and programming forum. I recommend to move your post to MicroStation Programming forum. To move existing discussion, use More > Move tool under your original post.

    Microstaion Version :08.05.01.05

    It is very old version, released 16 years ago. The problem is it's not certified for today Windows and also it does not support officially current development technologies (C++, NET etc.).

    I need to store the MicroStation element geometry to PostGIS geometry column.

    What geometry? It's very general question. MicroStation elements, even in the mentioned old version, span from simple line over line string, arcs, ellipses etc. to complex elements like complex shape, complex string or cells. And there are also more complicated elements like solids, SmartSolids, feature modeling objects etc.

    I try to store the microstation geometry from Vb.net Interop Microstaion application

    It's not the primary topic of this discussion, but how to you use VB.NET in MicroStation V8.5? It was not supported officially in this version (even when I remember some articles how to do it).

    But it requires fixed structure format of vertices.So i  iterate and convert Point3D array each x,y and z coordinates to string and pass this input for ST_GEomFromText.It'c consume more time for iterate and get the xyz coordinate string.

    I do not think it's right. Can you provide any benchmark and performance comparison? I have (at least) these objections:

    • To work with strings is always expensive operation regardless used language. But it can be done in a right way and a wrong way. Using what code do you create the string? And did you use some performance monitoring tool to ensure the code is efficient?
      Because SQL communication is text based, it will be always about building strings, regardless coordinates are formatted as TEXT or WKB (binary).
    • The whole chain from client to DB and back is long and complicated. Often a bottleneck is not how queries are created, because a code on client is much faster than communication and DB itself, but e.g. how data is committed to database (e.g. individual transactions vs recording in batch), so to focus on one individual step has to be justified by benchmarks to ensure this is the real bottleneck.
    • VB.NET + Interop will be always slow, because based on COM.
    Is any other method available for string microstaion element to postgis geomentry?

    Because you did not provide any details what "MicroStation geometry" is, it's hard to answer.

    It's always wise to check available frameworks, in this case e.g. NetTopologySuite.IO.PostGis, available as NuGet package, because it provides out of the box PostGIS connection functionality.

    I always recommend to do not use so old version, but to jump to current CONNECT Edition (or at least to V8i (SELECTseries 10)). MicroStation does not support GIS data and GIS databases, but at least newer versions are supported, certified for W10 and CONNECT Edition allows to use the latest software development technologies (new NET API, based on NET 4.6.2).

    As mentioned, OpenCities Map CONNECT Edition (Bentley Map successor) supports PostGIS as repository directly, so no development is necessary.

    With regards,

      Jan

Children
No Data