1
0
mirror of https://github.com/django/django.git synced 2025-01-18 22:33:44 +00:00
Adam Chainz 7c6efb3233 Refs #26753 -- Removed obsolete workarounds in GIS tests for lack of GDAL.
Missed in f7a363ee1d2039824d95f35e54219e09c5af67b0.
2016-11-15 11:46:06 -05:00

24 lines
773 B
Python

from django.contrib.gis.db import models
from django.contrib.gis.gdal import HAS_GDAL
if HAS_GDAL:
class RasterModel(models.Model):
rast = models.RasterField('A Verbose Raster Name', null=True, srid=4326, spatial_index=True, blank=True)
rastprojected = models.RasterField('A Projected Raster Table', srid=3086, null=True)
geom = models.PointField(null=True)
class Meta:
required_db_features = ['supports_raster']
def __str__(self):
return str(self.id)
class RasterRelatedModel(models.Model):
rastermodel = models.ForeignKey(RasterModel, models.CASCADE)
class Meta:
required_db_features = ['supports_raster']
def __str__(self):
return str(self.id)