[gdal-dev] Labeling rasters
Chaitanya kumar CH
chaitanya.ch at gmail.com
Mon May 16 15:41:17 EDT 2011
Jerl,
The contour attribute and the Z values are same here. Just one of them is
enough.
With the Z values near the magnitude of 1000, the burn value of 255 is not
going to make much of a difference. Use it if you want to offset any
negative Z values.
You should mention contour.shp instead of just 'contour' for
<src_datasource>.
Make sure BLANK.tif doesn't have different extents/projection.
Your final image will have a data type of Float64. You may have to run some
contrast stretching operations on it.
On Tue, May 17, 2011 at 12:04 AM, Jerl Simpson <jsimpson at wxtrends.com>wrote:
> Hi guys and gals:
>
> I have something that's evading me. I have a basic ESRI Shape file
> (created using gdal_contour) that I run through gdal_rasterize to
> generate very nice looking contour map. But I want the value of the
> contour in there.
>
> I've been trying different things with the -a option, but I can't get
> it to work out.
> Here's the latest thing I've tried for gdal_rasterize:
>
> gdal_rasterize -a contour -3d -b 1 -b 2 -b 3 -b 4 -burn 255 -burn 255
> -burn 255 -burn 255 -burn 255 -l contour contour BLANK.tif
>
> I put an extra burn value in there (have also tried with out) to see
> if maybe it was just going in as 0. BLANK.tif is just a black image.
> I'm sure I'm missing something simple, just can't see it. I thought
> the -a would burn the value of "contour" into the raster.
>
> Thanks for any guidance!!
>
> Here's the data from my shapefile:
>
> INFO: Open of `contour/'
> using driver `ESRI Shapefile' successful.
>
> Layer name: contour
> Geometry: 3D Line String
> Feature Count: 157
> Extent: (-0.500000, -89.830132) - (359.500000, 89.144137)
> Layer SRS WKT:
> GEOGCS["GCS_WGS_1984",
> DATUM["WGS_1984",
> SPHEROID["WGS_1984",6378137,298.257223563]],
> PRIMEM["Greenwich",0],
> UNIT["Degree",0.017453292519943295]]
> ID: Integer (8.0)
> contour: Real (12.3)
> OGRFeature(contour):0
> ID (Integer) = 0
> contour (Real) = 1000.000
> LINESTRING (87.765060240963862 80.0 1000,.....
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110517/587e7f9d/attachment-0001.html
More information about the gdal-dev
mailing list