MapofLife/MOL — Issue #24: How do we handle multiple types of uploads to CartoDB?
Author: gaurav
Created: 2011-11-28 23:25:13+00:00
State: open
Labels: Open question, Priority - Low

Historically, loader.py was designed to be run in a particular directory, and to bulkupload all the data it could find (stored as subfolders, each with their own `config.yaml` file. However, since we now support both polygon and point geometries, and since a table in CartoDB can only support a single type of geometry (point, line or polygon, but this might be changeable by fiddling with PostGIS via the SQL API), we need to figure out how loader.py should handle uploading different datasets in one go.

Something I haven't encountered yet, but probably will eventually: a single source (e.g. 'iucn') might have collections with different types of data. So do we need per-collection geometry types as well? Is there a smart way of getting a single PostGIS geometry field to access different types of geometries? Do we detect the incoming geometry (at the moment, we just assume that all shapefiles are polygons and all CSV files have lat/long fields), and put them into default 'polygon' and 'point' tables?

All other thoughts welcome!