Other Software and Data

 View Only
  • 1.  MapXtreme and GeometryCollection Question - Can it process?

    Posted 08-30-2022 10:53
    All,

    I am currently using MapXtreme 9.0 to process objects either by knowing the exact point(s) or by using an OGCWKT value.

    I have ran into an issue where we want to allow for a GEOMETRYCOLLECTION (for example say 4 points, and 4 polygons).

    My code that runs looks like this:

    Dim factory As MapInfo.Ogc.FeatureGeometryFactory = New MapInfo.Ogc.FeatureGeometryFactory(TheMap.GetDisplayCoordSys)
    Dim NewStyle As New LayerStyle
    featureGeometry = factory.FeatureGeometryFromWKT(strOGCWKT)

    The highlighted line is failing with the error message:  "The method or operation is not implemented."

    I then went into the documentation and do not see the GEOMETRYCOLLECTION listed as something that the Mapinfo.OGC namespace can handle (see the embedded image from the documentation that I am referreing to)
    From the MapXtreme 9.0 documentation


    Does anyone know if there is a way to support GEOMETRYCOLLECTION, or if it will be supported in a future release?

    ------------------------------
    Nicholas Evanish
    ------------------------------


  • 2.  RE: MapXtreme and GeometryCollection Question - Can it process?

    Posted 09-02-2022 06:39
    Edited by Dinesh Ahuja 09-02-2022 06:40
    FeatureGeometryFromWKT has only one flavor exposed which takes a string text for Single geometry. I will pass it onto Product team and let it decide on its future inclusion.
    Where as there is one class OgcGeometryCollection, which has FeatureGeometryFromOgcGeometryCollection API, which may be used, if you have Geometry in OGC format.

    ------------------------------
    Dinesh Ahuja
    Precisely Softwares Inc.
    NOIDA
    ------------------------------



  • 3.  RE: MapXtreme and GeometryCollection Question - Can it process?

    Posted 09-02-2022 09:26
    Dinesh,

    Thank you for your reply.  I am currently using MapXtreme v 9.0.  I am going to work on downloading v 9.4 which is the latest to see if that exposes the FeatureGeometryFromOgcGeometryCollection API.  I do not see that in the v 9.0 I am using (see my code screen shot below, it is not an option)

    The only thing exposed off of Mapinfo.Ogc is the FeatureGeometryFactory.   From there, the only thing exposed is shown in the screen shot below:

    Code sample w/ MapXtreme v9.0
    Is your recommednation to accessing FeatureGeometryFromOgcGeometryCollection come from using MapXtreme 9.4 ?

    Is it possible to provide a code sample to me in this thread that I can try to use?

    I look forward to hearing from you.  Thank you very much for the help so far.


    ------------------------------
    Nicholas Evanish
    ------------------------------



  • 4.  RE: MapXtreme and GeometryCollection Question - Can it process?

    Posted 29 days ago

    Hi Nicholas,

    I dig in little deeper, the API i mentioned is not publicly exposed, My bad on that.
    Whereas FeatureGeometryFromWKT(string text) or FeatureGeometryToWKT(FeatureGeometry featureGeometry) down in the code handles OGC type collection. So if the passed in object has a collection code shall be able to handle that. The private API which i mentioned takes care of that in the code. Please make sure the passed in object is in OGC collection object.

    Thanks,

    Dinesh



    ------------------------------
    Dinesh Ahuja
    Precisely Softwares Inc.
    ------------------------------



  • 5.  RE: MapXtreme and GeometryCollection Question - Can it process?

    Posted 28 days ago
    Dinesh,

    Thank you for the reply.  I worked out test code (shown in the image below) where I passed an OGCWKT string.
    MapXtreme 9.0


    The strOGCWKT string combines both MULTIPOINT and POLYGON (not MULTIPOLGYON) and is shown below in green:
    GEOMETRYCOLLECTION(MULTIPOINT((-79.927103 40.362249), (-79.923618 40.361994)), POLYGON ((-79.924831 40.363195, -79.924694 40.361577, -79.924687 40.361388, -79.926744 40.3613, -79.926812 40.361381, -79.926955 40.361528, -79.926941 40.36184, -79.926929 40.361972, -79.92691 40.362163, -79.926879 40.362162, -79.926132 40.362129, -79.92611 40.362422, -79.92608 40.362805, -79.925033 40.363122, -79.924916 40.363158, -79.924863 40.363175, -79.924831 40.363195)))

    The error reported is "The method or operation is not implemented."

    Please let me know your thoughts on what could be causing this error.  My assumption is that MapXtreme is unable to handle a GEOMETRYCOLLECTION of different individual map object types?

    I look forward to hearing from you to try and work this out.

    Thank you in advance.


    ------------------------------
    Nicholas Evanish
    ------------------------------



  • 6.  RE: MapXtreme and GeometryCollection Question - Can it process?

    Posted 28 days ago
    I investigated further and found out that collection down in the code is not allowing to add geometry and that is why you are getting the exception. Long story short "Collection not supported".

    ------------------------------
    Dinesh Ahuja
    Precisely Softwares Inc.
    ------------------------------



  • 7.  RE: MapXtreme and GeometryCollection Question - Can it process?

    Posted 28 days ago
    Dinesh,

    Does this mean that MapXtreme does not support a mixed object type GEOMETRYCOLLECTION?

    Does version 9.4 support this GEOMETRYCOLLECTION type?

    I am trying to get a better understanding on whether or not I have to fully reject this type of GEOMETRYCOLLECTION because MapXtreme will never support it, or is there hope that MapXtreme will support it in a future release?

    ------------------------------
    Nicholas Evanish
    ------------------------------



  • 8.  RE: MapXtreme and GeometryCollection Question - Can it process?

    Posted 27 days ago
    Hi Nicholas,

    Current version of MapXtreme does not support this. We have to consider this as Enhancement. I will pass it onto PM team. Following comment section explains that it is not supported already and we have not made any changes to support it yet.

    /// <summary>Adds a FeatureGeometry object to the FeatureGeometryCollection.</summary>
    /// <remarks>The current version of MapXtreme does not implement this method,
    /// and if called, a NotImplementedException is thrown. Later versions of MapXtreme
    /// should provide an implementation of this method.</remarks>
    /// <param name="featureGeometry">A FeatureGeometry object to add to the
    /// FetaureGeometryCollection. The FeatureGeometryCollection contains a copy of this
    /// FeatureGeometry, it contains this exact reference.</param>
    void Add(FeatureGeometry featureGeometry);

    ------------------------------
    Dinesh Ahuja
    Precisely Softwares Inc.
    ------------------------------



  • 9.  RE: MapXtreme and GeometryCollection Question - Can it process?

    Posted 27 days ago
    Dinesh,

    Thank you for the reply.  I hope that the development team can look into supporting this OGCWKT GEOMETRYCOLLECTION in a future release.

    Please keep me posted if this gets a case number or bug number that I can follow on future MapXtreme release notes.

    ------------------------------
    Nicholas Evanish
    ------------------------------