2

I'm trying to convert a .mif file to GeoJSON. I've got .mif, .mid and .dbf. But when I convert it, the properties included in .dbf are not rendered in the GeoJson file. The command I use is : ogr2ogr -f GeoJSON file.json file.mif.

Is there something wrong with my command or do I need to add an option?

More infos:

With ogrinfo for the .dbf file :

ogrinfo car_m.dbf -so car_m
INFO: Open of `car_m.dbf'
      using driver `ESRI Shapefile' successful.

Layer name: car_m
Metadata:
  DBF_DATE_LAST_UPDATE=1913-10-18
Geometry: None
Feature Count: 2278213
Layer SRS WKT:
(unknown)
id: String (21.0)
idINSPIRE: String (30.0)
idk: String (25.0)
ind_c: Real (16.4)
nbcar: Real (16.4)

And from .mid :

Geometry: Unknown (any)
Feature Count: 2278213
Extent: (48385.790000, 1620790.500000) - (1197778.210000, 2676806.350000)
Layer SRS WKT:
PROJCS["unnamed",
    GEOGCS["unnamed",...]

idINSPIRE: String (30.0)
id: String (21.0)
Draken
  • 3,134
  • 13
  • 34
  • 54
Camsae
  • 21
  • 3
  • Do I necessarily need to use a conversion to shp before the conversion to json, in order to merge the original dbf file with the dbf file containing ids from the first conversion ? – Camsae Mar 02 '17 at 11:09
  • 1
    This might be better to ask in the http://gis.stackexchange.com/ site. – T_Bacon Mar 02 '17 at 11:18
  • But as a quick note, I'm pretty sure the DBF is unrelated to the MID/MIF files They should be treated separately as two different file formats (and possibly different sets of data). – T_Bacon Mar 02 '17 at 11:19
  • Thanks, I think so too. I converted the .mif in two steps, using .shp and merging the DBF file generated with the original one before converting to GeoJson. – Camsae Mar 02 '17 at 11:55

1 Answers1

0

A solution : I converted the .mif in two steps, using .shp and merging the DBF file generated with the original one before converting to GeoJson, as relations are .mif/.mid and .shx/.shp/.dbf.

Camsae
  • 21
  • 3