No, they don't mean coordinates, they mean the actual index location in a 
grid.

Say you have a 100x100 grid, each (x, y) coordinate like (1, 5) represents 
one tile image.

On Tuesday, July 3, 2018 at 3:43:07 PM UTC-4, Xristos Xristoou wrote:
>
> i want to add raster functionality in django using postgis database using 
> django-raster package and this docs 
> <http://django-raster.readthedocs.io/en/latest/tms.html>.
>
> here my code :
>
> models.py
>
> from django.contrib.gis.db import modelsclass RasterWithName(models.Model):
>     raster = models.RasterField()
>     name = models.TextField()
>
> add raster using console :
>
> from django.contrib.gis.gdal import GDALRasterfrom myapp.models import 
> RasterWithName
> gdal_raster = GDALRaster('C:/Users/username/Desktop/image.tif')
> rast = RasterWithName(name='one', raster=gdal_raster)
> rast.save()
>
> but i am very confused with Rendering tiles and urls.
>
> docs say :
>
> */raster/tiles/layer_id/{z}/{x}/{y}.png where the layer_id is the primary 
> key of a raster layer. This structure can be used directly in online 
> mapping software such as OpenLayers or Leaflet. An example request could 
> look like this: /raster/tiles/23/8/536/143.png, returning a tile in png 
> format of the layer with ID pk=23 at zoom level z=8 and indexes x=536 and 
> y=143*
>
> but indexes x,y mean some random x,y coordinate in image ?anyway i using 
> this url http://127.0.0.1:8000/raster/tiles/1/8/536/143.png or 
> http://127.0.0.1:8000/raster/tiles/1/8/20/40.png(origin x,y in my image) 
> and i take a black window in my browser,any idea where i have wrong in my 
> url rendering ?
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/77b21ebc-913f-48f9-a9f8-28b742a116fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to