0

Sorry for my absolute ignorance, I have 1 day of experience in GIS systems (I'm just a Java developer).

Our client did provide us a compressed file with huge .TAB, .MAP, .ID, and .MAP files, and wants a little app to check if certain coordinates are inside the "coverage" polygons (defined on the aforementioned maps).

EDIT:

I've found that the files that I have are MapInfo files, and they can be converted into Google KML files, which can be later processed to see if certain coordinates are inside. However, the online tools I found to do this conversion are size limited (ex: 5 MB and my MAPINFO file is 245 MB)

How could I make this conversion?

2
  • For converting to KML, you can either use ogr2ogr GDAL utility with something like ogr2ogr -f KML output.kml input.tab or use QGIS (opensource software) that open Mapinfo files and can export Mapinfo files to KML
    – ThomasG77
    Commented Feb 26, 2021 at 0:17
  • Awesome! Thank you very much for your help Thomas Commented Feb 26, 2021 at 0:54

1 Answer 1

1

One approach amongst other possible.

It's not possible to manage the load without server side component as your input file is too heavy to display directly on client side.

I would install a PostgreSQL/PostGIS instance, create a database with PostGIS support.

I would load Mapinfo table data in a PostgreSQL/PostGIS database using GDAL.

ogr2ogr -f PostgreSQL PG:"host=pghost user=pgloginname dbname=pgdbname password=pgpassword port=5432" "yourdata.tab"`

Then, I would call the database using an API (not specialist in Java but something like Spring boot should do fine) that take x and y coordinates as parameters and that return infos if the coordinates are contained within a polygon from the Mapinfo table now loaded in PostGIS.

With PostGIS, you have spatial SQL operators to find out if a point is within a polygon e.g How to check a set of points are inside a polygon or not in postgis?

Then, I would call from a Javascript map client library the API. Something like if people click on the map, it returns the coordinates and you use these coordinates to echo if they are are within the polygons.

PS: the solution does not account if you want to visualise the Mapinfo data on the map.

2
  • Thank you very much by your tip Thomas. I'll try to sort out the .TAB file to Database conversion with your ogr2ogr command. Just a question: Does the 1 kb TAB file contain all the polygon-related information related with the coverage areas? If that's the case, what's the purpose of the huge 245 MB .MAP file, and the others? Just visual related data, i.e. map tiles? Commented Feb 26, 2021 at 0:35
  • ".TAB, .MAP, .ID, and .MAP files" are a set of files that work together. See en.wikipedia.org/wiki/MapInfo_TAB_format to learn for each file role. .TAB file does not contain anything, more a metadata file. You can inspect it content with a text editor.
    – ThomasG77
    Commented Feb 26, 2021 at 2:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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