Skip to main content
Question

Convert .MIF to SHP with converted fills


Forum|alt.badge.img

I am attempting to translate a .MIF to a shp file. I can preview it and it looks nice in the FME preview pane, but when i run the translator, i only get the outlines and not the fill. what Transformer do i need to help coax the fills to translate to the shp file?

12 replies

danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • March 11, 2019

Hi @kmaughan111

 

Did you use the transformer FeatureColorSetter?

 

Thanks,

Danilo


redgeographics
Celebrity
Forum|alt.badge.img+48

Shapefiles can't story any kind of styling information (such as color and linestyle), you can map the mid/mif attributes to shape attributes but ultimately the styling is handled by whatever application you're going to view the resulting shapefile in.


Forum|alt.badge.img

i'm not sure if i can convert this...is there an example on line that i can use that will show me how to take a mif with solid fills and convert it over to a usable format? the example i was using has helped me but i only get outlines....i think i need something that will push the solid fills through the transformer. I tried to use the Feature color setter, but maybe i am not using it right.


Forum|alt.badge.img

Ok, i was able to get fills to come in...the MIF file that i am using has a border box that needs to be deleted.

After its deleted, the shapes are there (in ArcGIS Pro), but all in one color. I've tried to recolorize this.

But no luck so far....it does process with "FIDs" (i am looking at this in ArcGIS Pro).

It looks like if they were somehow tagged (FIDs), it could give me the range of color values i'm looking for....


Forum|alt.badge.img

Yeah, I can't use the FIDs...


redgeographics
Celebrity
Forum|alt.badge.img+48
kmaughan111 wrote:

Ok, i was able to get fills to come in...the MIF file that i am using has a border box that needs to be deleted.

After its deleted, the shapes are there (in ArcGIS Pro), but all in one color. I've tried to recolorize this.

But no luck so far....it does process with "FIDs" (i am looking at this in ArcGIS Pro).

It looks like if they were somehow tagged (FIDs), it could give me the range of color values i'm looking for....

You can tey exposing the fme_color and fme_fill_color attributes and write those to shape, but still this won’t cause Arcmap to automatically style them


Forum|alt.badge.img
redgeographics wrote:

You can tey exposing the fme_color and fme_fill_color attributes and write those to shape, but still this won’t cause Arcmap to automatically style them

i was able to expose some brush type attributes ...but still not getting the range i see coming in from the FME viewer. I do get a selection of MIF attributes that are exposed...i'll look at this further, but might have to switch over to another transformer if I can't seem to get the featurecolorsetter to work. thanks so much for your help!


Forum|alt.badge.img

thanks for your help yesterday...the Featurecolorsetter is a big help...but still not getting what i see on the fme preview screen. (when i open the raw MIF file). I realize that there may not be a 1:1 transformation step; but have been able to access the mif paintbrush forecolor and fme_fill_Color. If i use the FID in arcgispro, i can access all the polygons, but they are randomly assigned FID #s and that does not really help. I'll look at this a little later this week. thank for all your help!


redgeographics
Celebrity
Forum|alt.badge.img+48
kmaughan111 wrote:

i was able to expose some brush type attributes ...but still not getting the range i see coming in from the FME viewer. I do get a selection of MIF attributes that are exposed...i'll look at this further, but might have to switch over to another transformer if I can't seem to get the featurecolorsetter to work. thanks so much for your help!

Let me elaborate: mid/mif is a format which stores style information, so line and fill colors as well as some other stuff (line width and style if I recall correctly). Shapefile is not. It does not store style information at all. You can use a FeatureColorSetter on the data before writing to Shape but it won't store those colors, so you might as well skip that one.

What you can do is expose the fme_color and fme_fill_color attributes, or some of the mif_... style attibutes and write those values to new attributes on the shapefile. You will then need to set up ArcGIS to connect specific styles and colors to those attribute values, this will not happen automatically because ArcGIS will not recognize it as a color.

The FID is indeed a randomly assigned ID so not useful for what you want to do.


Forum|alt.badge.img+2

The MapinfoStyler is designed to help you do this kind of formatting of your MapInfo output. for both MIF and TAB. Please let this thread know if it doesn't give you the results you need.


Forum|alt.badge.img
markatsafe wrote:

The MapinfoStyler is designed to help you do this kind of formatting of your MapInfo output. for both MIF and TAB. Please let this thread know if it doesn't give you the results you need.

i seem to only get one color when it processes.....any suggestions?


Forum|alt.badge.img+2
kmaughan111 wrote:

i seem to only get one color when it processes.....any suggestions?

@kmaughan111 apologies, I misread the original post - I read SHP->MIF not MIF to SHP. Shape doesn't preserve any symbology. As @redgeographics says, your application (ArcGIS) has to create the symbology


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings