GeoDjango GIS Model Fieldset Usage

20 views
Skip to first unread message

Shazia Nusrat

unread,
Jan 10, 2018, 8:04:20 PM1/10/18
to django...@googlegroups.com
Hi,

I need quick help about using the fields in the following model:

class Size(models.Model):
   azimuth = models.CharField(max_length=200, blank=True, null=True)
   tilt = models.CharField(max_length=200, blank=True, null=True)
   boundary_coordinates = models.CharField(max_length=200, blank=True)
   height = models.CharField(max_length=200, blank=True)
   width = models.CharField(max_length=200, blank=True)

I know there is a function reference for it but I don't know how to use it as per the link below because I am newbie. 


Please advise.

Jani Tiainen

unread,
Jan 10, 2018, 11:30:57 PM1/10/18
to django...@googlegroups.com
Hi.

So what is your actual problem?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD83tOz2xe4mHbbd1Xyag-Tad%2B3zsRjtQyTgC1C4Q35V1Wf4gg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Shazia Nusrat

unread,
Jan 10, 2018, 11:54:32 PM1/10/18
to django...@googlegroups.com
For Instance...lets say I need to let customer calculate Azimuth for the home roof with ModelForm.
Its not a simple one single direction. If you can do it let me know with example.

Regards,
Shazia.

Jani Tiainen

unread,
Jan 11, 2018, 12:44:31 AM1/11/18
to django...@googlegroups.com

Hi,

Apparently you have mistaken what GeoDjango is.

GeoDjango is a GIS framework, that is it deals with (usually) real world coordinates.

And in most cases coordinates are 3D. Two well known coordinate systems are WGS84 (GPS uses this) and second one is Google Transverse Mercator.

GIS is usually used to do spatial lookups, like does two geometries intersect, or is point within specific polygon.

In GIS you do have few math ops, mainly distance and area. Distance and area math depends a bit of used coordinate system since some coordinate systems can take earth curvature in to account.

What you asking is actually is more like trigonometry which GeoDjango can't really do.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

For more options, visit https://groups.google.com/d/optout.

-- 
Jani Tiainen
Reply all
Reply to author
Forward
0 new messages