Hello Nick,
As Ross has pointed out, unlike TAB file sets, SHP does not carry any styling information. In the ArcGIS world, all styling is applied like thematic mapping in Pro. You can store these styling rules in a layer file (LYR) which accompanies the Shapefile set.
To reproduce your MapInfo TAB styling in ArcGIS, you would need to have an attribute in your data which could be used to apply the styling. E.g. a name or numeric classification. If you don’t have that (i.e. perhaps they were manually applied), there is a way of extracting the brush details (which includes the colour) with a command run in the MapBasic window. To following this method add, say, a char(20) field called tab_brush to your polygon data, open the MapBasic window and run the following update command:
update myTable set tab_brush = objectinfo(obj,3)
(replace myTable with your table name)
The result will be that tab_brush will be populated with data such as “Brush (2, 13559507)”. The first number is the fill type (2=solid) and the second is the RGB colour value. In ArcGIS you can style based on this attribute, although it’s a bit tedious working out which is which is you have quite a few colours. Perhaps run Pro and ArcGIS side-by-side to help with that. Save your styles in an ArcGIS layer file, or MXD (sort of the equivalent of a Pro workspace) to retain your work.
Regards,
Warren Vick
Europa Technologies Ltd.
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello Nick,
If your intention was to go to GeoServer, I don’t think even the build-in styles of the TAB format would help you. As far as I’m aware, GeoServer uses SLDs to create rules for how features are drawn…. just like ArcGIS or Pro’s thematic mapping. The solution is still to make sure that your data has the attributes which will allow you to do that data-driven cartography. So, as I outlined, if you don’t have a name/number classification which drives your colours, just use the method to make a new field with the brush details and create SLD rules using it. How many classifications/styles do you have? Is it just a handful or are you representing a continuous phenomenon and have lots of colours?
Hello Nick -
You can convert a tab file to shape using the ogr2ogr command-line program from http://gdal.org.
Normally - as noted by Warren - a shape file doesn't contain any information the visual representation of the objects as tab-files do.
However you can use an relative obscure function in ogr2ogr to obtain colorvalue, linetype etc. and ve these values in a extra field during the conversion.
This is the normal method:
ogr2ogr -f "ESRI Shapefile" rivers.shp rivers.tab
However using this:
ogr2ogr -f "ESRI Shapefile" -sql "select *, CAST(OGR_STYLE AS character(255)) from rivers" rivers.shp rivers.tabThe command will create an extra field "OGR_STYLE" in the shape file containing a style definition text. See: http://www.gdal.org/ogr_feature_style.html for further explanations
Warren & Bo,
Hello Nick,
Looks like you’re all set. With just 7 style classes, you could simply those pen/brush strings down to a simple number so save any future SLD editor the pain of working out what they are!
Regards,
Warren Vick
Europa Technologies Ltd.
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com]
On Behalf Of Nick
Sent: 18 September 2017 13:43
To: MapInfo-L <mapi...@googlegroups.com>
Subject: Re: [MI-L] Convert .TAB format to .SHP format but maintain .TAB object styles
Warren & Bo,
--
--