Re: Polymorphic class and geomodels?

2016-02-08 Thread Sergiy Khohlov
Class Based Views has ability to include function in view from template. Short example: I have finished small (GTS) project related to GPS system. Each car has a array of points (car positions) and route (named as LineString in GeoDjango). part of models.py class Points(models.Model):

Re: Polymorphic class and geomodels?

2016-02-05 Thread Luca Moiana
Hi Serge, sorry for the expert warning you gave me on performance. But I have trouble following your really techincal suggestion, my goal is to have one table with measures that is related to three models with different geometries, so I can't use a foreign key in measure table, I don't

Re: Polymorphic class and geomodels?

2016-02-05 Thread Sergiy Khohlov
I’ve decided to use connection via key. and using via key directly or via related objects. Such us Car -> Point (multiline). Reason is simple : django creates not perfect database structure and I would like think about performance as soon as possible. My project contains Car and points

Re: Polymorphic class and geomodels?

2016-02-05 Thread Luca Moiana
Hi Serge, thank you for your reply. I'm working on an environmental monitoring app, where I want to store, and serve, monitoring value on different geometries, points, tracks or polygon. That's why I'm trying to use a polymorphic model in order to have one entity and multiple geometries.

Re: Polymorphic class and geomodels?

2016-02-05 Thread Sergiy Khohlov
I would like as simple question : Are you planning to have some advantages using this abstract class ? I’m working on similar product (look like you are making energy pipeline system based on postgis and gjango). My product is GTS system which includes POINTS (datas are received via GTS

Re: Polymorphic class and geomodels?

2016-02-05 Thread Luca Moiana
Hi Collin, Sorry for the late reply, but I still don't get the google groups; Yes, I am tryng to crete a models where you can choose between the three geometry types. I'll go back to my app and test the code you suggested and post again the error. thanks On Wednesday, October 28, 2015 at

Re: Polymorphic class and geomodels?

2015-10-28 Thread Collin Anderson
Hello, Are you trying to combine multiple models into one, like this? class PolyModel(pdmpunto, pdmtransetto, pdmarea): pass You could also try asking on the geodjango list: http://groups.google.com/group/geodjango Collin On Monday, October 26, 2015 at 7:18:24 AM UTC-4, Luca Moiana

Polymorphic class and geomodels?

2015-10-26 Thread Luca Moiana
Hi, working on my first django app, and run into a problem. I tend to create geodjango objects, and add all data from external tables with pk. Then I want to have different geometries 8points, lines, polygons) into a unique polymorphic class, can I do that? I have an error that I'll