forked from gem/oq-engine
-
Notifications
You must be signed in to change notification settings - Fork 1
Faulted Earth Django API
bwyss edited this page May 10, 2011
·
11 revisions
The Faulted Earth django server application exposes the following set of api endpoints for use by the GeoExt client.
^observations/ ^obsform/$
Allows the user to upload an observations form that describes a set of atributes for a fault section.
Form parameters:
- user manually enters observation attributes into Django form. There are 5 observation type forms, for the current demo releas the tool will only include the Slip observation form.
class TempFormSlip(models.Model): OBS_TYPE = ( ('0','Displacement'), ('1','Event'), ('2','Recurrence Interval'), ('3','Seismogenic Geometry'), ('4','SlipRate'), ) observationType = models.CharField(max_length=1, choices=OBS_TYPE, default='4') SLIP_TYPE = ( ('0','Normal'), ) slipType = models.CharField(max_length=1, choices=SLIP_TYPE, default='0') hv_ratio = models.CharField(max_length=100, default='1:3.75') rake = models.CharField(max_length=100) net_slip_rate = models.CharField(max_length=100, default='pref, min, max') dip_slip_rate = models.CharField(max_length=100, default='pref, min, max') marker_age = models.CharField(max_length=100) SLIP_RATE_CAT = ( ('0','0.001 <0.01'), ('1','0.01 <0.1'), ('2','0.1 <1'), ('3','1 <5'), ('4','5 <10'), ('5','10 <50'), ('6','50 <100'), ('7','100 <200'), ) slip_rate_category = models.CharField(max_length=10, choices=SLIP_RATE_CAT, default='0') strike_slip_rate = models.CharField(max_length=100, default='pref, min, max') vertical_slip_rate = models.CharField(max_length=100, default='pref, min, max') site = models.CharField(max_length=100, default='-42.375, 176.543') notes = models.TextField()