0

In the new Django version support raster field and I follow this manual for GeoDjango raster field and this question for add raster I have built a simple demo.

here the code :

settings.py

postgis database backend

'django.contrib.gis.db.backends.postgis'

models.py

from django.db import models
from django.contrib.gis.db import models

class Elevation(models.Model):
    name = models.CharField(max_length=100)
    rast = models.RasterField()

all works fine without error.

but i have one BIG question where i dont know how to complete it.

How do I display this raster in some web map like Leaflet?

0

You will need something to tile the raster and then serve these as tiles to Leaflet as if it was a background map. You probably want to use Geoserver or something similar to do this.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.