1

I have geographic data in an Oracle database. The data was imported by EasyLoader, which is a MapInfo-Tool. I want to publish this data in a Web Map Service. I have tried to use MapServer, but I have problems handling the styles.

I know that the in MapServer, it is possible to get the correct styles by OGR, if they are in a TAB-File.

CONNECTIONTYPE OGR
CONNECTION "Cables.TAB"
STYLEITEM "AUTO"

The same data is in the database and I created an new layer section:

CONNECTIONTYPE PLUGIN
PLUGIN "msplugin_oracle.dll"
STYLEITEM "AUTO"

An error occurs

General error message. 'STYLEITEM AUTO' not supported for this data source.

If I define a manual style with

CLASS
    STYLE
        COLOR 0 0 0
        WIDTH 2.5
    END
END

the lines are shown.

So here is the question: Is there any possibility to use the AUTO StyleItem with an oracle spatial database to decode the mapinfo style?

Or do you have any suggestions, how I could use this information for styling my items?

1

When loading MapInfo tables into a spatial database such as Oracle, MS SQL Server or PostgreSQL/PostGIS, MapInfo Pro/MapInfo EasyLoader can store the styling information in two ways.

  1. It can be stores in the MapInfo.MapInfo_MapCatalog as a single style per table
  2. It can be stored as an attribute in a separate column for each record in the spatial table.

In both cases the styling information is stored using the MapBasic style definitions:

  • Pen
  • Brush
  • Symbol
  • etc.

So you need to extract the styling information directly from the either the MapInfo_MapCatalog or from the style column (often named MI_STYLE) in the tables.

There's a similar thread here discussing how to get the styling information from MapInfo tab files for use in a WMS server: What's the easiest way (style wise) to publish my MapInfo map as WMS?

Alternatively, you can have a look at using Spectrum Spatial as a WMS server. Spectrum Spatial is sold by Pitney Bowes who I also work for (full disclosure).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.