Spectrum Spatial (SSA/LIM)

 View Only
  • 1.  Identifying Table Geometry Type(s)

    Posted 08-09-2021 12:28

    Hey gang. We built an app to interrogate all tables in a Spectrum repository folder and return the intersecting data for a point. The problem is, there are several tables that do not have polygons.

    Is there a way to quickly tell (like in the metadata?) what geometry type(s) are in the table?

    For example, if this was in MapInfoPro/MapBasic I would query something like...

    Select str$(obj) "Type"
    From TargetTable
    Group By Col1

    Thanks,
    -- Steve



    ------------------------------
    Steve Wallace
    Florida Farm Bureau Insurance
    ------------------------------


  • 2.  RE: Identifying Table Geometry Type(s)

    Posted 08-10-2021 19:00
    Hi Steve,

    One option would be to call the Feature Service with a query looking for anything that isn't a Polygon.

    Here is an example
    http://spectrum:8080/rest/Spatial/FeatureService/tables/features.json?q=SELECT * from "/Samples/NamedTables/dcwashwaterbodies" WHERE NOT MI_GeometryType(Obj) in ('Polygon','MultiPolygon')

    There are a number of other "polygon" types you may also wish to include
    https://docs.precisely.com/docs/sftw/spectrum/20.1/en/webhelp/Spatial/index.html#Spatial/source/misql/misqlapiguide/functions/migeometrytype.html

    You can also run your query with a little be of syntax change
    SELECT MI_GeometryType(Obj) as Type from "/Samples/NamedTables/dcwashwaterbodies" Group By MI_GeometryType(Obj)



    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------