« first day (1185 days earlier)      last day (2393 days later) » 

1 message moved from Python
 
7 hours later…
16:32
from __future__ import unicode_literals
from django.db import models
from django.contrib.gis.db import models

# Create your models here.
class Incidences(models.Model):
name = models.CharField(max_length=20)
location = models.PointField(srid=4326)
objects = models.GeoManager()

def __unicode__(self):
return self.name

class Meta:
verbose_name_plural =" Incidences"

class Municipios(models.Model):
inspireid = models.CharField(max_length=24,null=True)
country = models.CharField(max_length=2,null=True)
# This script reads a GPS track in CSV format and
# prints a list of coordinate pairs
import csv

from django.contrib.gis import geos
from .models import CoordPoint
from django.contrib.gis.geos import Point

# Set up input and output variables for the script
gpsTrack = open("./data/2018-01-01.csv", "r")

# Set up CSV reader and process the header
csvReader = csv.reader(gpsTrack)
header = next(csvReader)
latIndex = header.index("report_latitude")
lonIndex = header.index("report_longitude")
nameIndex = header.index("report_ID")
2 messages moved from Python

« first day (1185 days earlier)      last day (2393 days later) »