Open gaurav opened 12 years ago
I'm mostly done with this. I eventually opted to use COPY, since I didn't have to worry about field names as long as the field names in the CSV file and in the database stay in sync, which -- thanks to validation and the new get-db-schema.py script -- shouldn't be too hard.
At the moment, my code (@d1ce6ba) has two flaws:
I just had a discussion with @eightysteele about this, and he suggested:
config.yaml
at some point (since loader.py
knows where they are already, it seems a shame to force users to fill them in).As of @ce6c4ab061, loader.py
will delete the last collection before uploading a new collection. So we've met every criteraia of this issue except indexing and row counts. I'll work on that once the GIS integration happens.
We need to load the metadata into PostgreSQL so that it can be used by the tiler to visualize the layers using metadata values. This should happen as part of usual
loader.py
behavior, and should happen before we upload to Google App Engine, so that the App Engine never knows about layers which the tiler doesn't know about.The simplest way to do it for now either be (1) as a single field in PostgreSQL which stores a JSON document, which we can then search through, or (2) just setting up the table based off the fields and characteristics in our Fusion Table, and INSERT, UPDATE, COPY or pgloader. I'll look to see what fits better with the way
loader.py
already works, and implement that now.