You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great project! I love it! Wondering if i can import a csv that contains geographical data.
For example, something like this
c = CopyMapping(
MyModel,
"./data.csv",
dict(point=['x', 'y'], number='NUMBER')
)
c.save()
Here's a row from the dataset for example:
['-77.0297110577', '38.9291522717', '11802074', '8330232', 'False', 'P173', 'NO PARKING STREET CLEANING', '3200 BLOCK 13TH ST NW EAST SIDE', 'DC', '4D', '806540', '5618.0', '397424', '140141', 'Parking_Violations_in_April_2010.csv', '2010-04-06T09:39:00.000Z']
The text was updated successfully, but these errors were encountered:
+1
It looks like this, or something pretty close to it, would work--see this SO answer. A few years ago I was doing something comparable by using django.contrib.gis.geos.GEOSGeometry -- for a geosgeometry g, g.hex work(ed), though I can't remember why I went that route.
I'm all for trying it, I just want the API syntax we select to be as clear as possible. Generally this library is modeled on the layout of Django's LayerMapping tool for loading shapefiles. You see anything there we could crib from?
Great project! I love it! Wondering if i can import a csv that contains geographical data.
For example, something like this
c = CopyMapping(
MyModel,
"./data.csv",
dict(point=['x', 'y'], number='NUMBER')
)
c.save()
Here's a row from the dataset for example:
['-77.0297110577', '38.9291522717', '11802074', '8330232', 'False', 'P173', 'NO PARKING STREET CLEANING', '3200 BLOCK 13TH ST NW EAST SIDE', 'DC', '4D', '806540', '5618.0', '397424', '140141', 'Parking_Violations_in_April_2010.csv', '2010-04-06T09:39:00.000Z']
The text was updated successfully, but these errors were encountered: