Tag Info

Hot answers tagged

6

This is currently not supported. The only way you are able to do this is to embed or link a png in a SVG file. Adding support for loading other image formats shouldn't be too hard for a future version.


5

I know your question is tagged with ArcGIS but I thought it might be interesting to describe an approach that almost solves this problem using R (which is opensource and free). The idea is that you load in any shapefile, and then loop through the list of polygons printing each one out as a png. It is quite quick to produce each png ( a few seconds) - not ...


4

You may also use ArcPy to zoom to each feature and export, see link below. http://gis.utah.gov/code-python/python10-zoom-to-feature-export-layout


4

Data Driven Pages. use the shapefile for your index layer. Set up your layout so that you have no margins and it is the size of the PNG you want. To export, follow the instructions and the bottom of this page under "How to export Data Driven Pages to other formats using ArcMap": ...


4

Agree with Devdatta, PNG Itself won't have the data. However its possible the data could be contained in an associated file. For example GDAL can export PNGs with the referencing stored within filename.aux.XML


4

reaname world file to .pgw from .pnwx. keep both image and world in same directory with same name.


3

I would suggest you to go through their API documentation. Coming back to your question, you can iterate through all layers in the TOC using: canvas = qgis.utils.iface.mapCanvas() allLayers = canvas.layers() for i in allLayers: print i.name() #Do other stuff here.


3

Couldn't you try something like... SELECT encode(ST_AsPNG(rast), 'base64') FROM foo Granted, I have no idea if that'll work but it is worth a shot.


3

I just gave this a test using ArcGIS for Desktop 10.2 on Windows 7 SP1 and was able to create a PNG and GIF files that had a transparent background that I could verify by inserting them as pictures into Word 2010 as In Front Of Text. I followed the Exporting your map instructions from the ArcGIS 10.1 Online Help, using Rose Quartz as both Background and ...


3

From Jeff Moulds (ESRI) originally for pdf export here's some python you can customize. It works on all mxds in a folder so you could adjust that or perhaps copy the projects into one temporarily for exporting. I added paragraph spaces after the first 3 lines to make the text properly indent in the box below, not being smart enough to do that any other ...


3

Images > Adjustments > Levels > Click Auto! Or just 'Ctrl + L'. You may need to adjust the levels to auto twice to get a more desirable results (not just for hillshades). The first time you press Auto, the results can be quite dark/saturated. Doing that a second time lightens things up. But seeing as you only have two values, black or white, this may get ...


3

Try this: d.mon start=png d.rast RASTER d.vect VECTOR d.mon stop=png This will basically render VECTOR layer on top RASTER layer to a file called map.png. Other things you could do with d.mon start=png - d.mon stop=png: Type d.erase to wipe the slate clean before committing with d.mon stop=png Include the legend with d.rast.leg: d.mon start=png ...


3

Compose your map and export using d.out.file http://grass.osgeo.org/gdp/html_grass64/d.out.file.html


3

Avances, The output of ST_AsPNG is the binary blob of a PNG file, so you output it to a file as you would any other binary document saved in PostgreSQL . It really depends what you are using as your tool. For example we have examples of this that output to browser in thsese quick examples we put together to demonstrate how it is done. ...


2

Have you tried '-t' flag? Its there in 6.4.1.


2

The easiest way to do it would be to use Geoserver/GeoWebCache with MS SQL Server extension. Unfortunately, you will not get PNG files with quadkey as you aspect, but you get a service that can server tiles as a WMS-C/TMS standard which shouldn't be to difficult to implement into your application. Also it has possibility to re-render particular tiles as you ...


2

Further to Mike's answer, gdal_translate has the -ot switch to force a given datatype (-ot Byte in your case), and the -mask switch to select a band as a mask, e.g.: -mask 4 My ImageMagik-fu isn't strong, but an alternative is if you can get IM to just output the rectangle it would have used to trim the image, you could use the -srcwin option of ...


2

Just a wild guess for the 16 bit pixels issue: you can try forcing 8-bit or byte pixels in convert by using png8:trimmed.png as the output filename. If you are using precompiled Windows binaries, you can download the "Q8" releases, which uses byte computations only.


2

Increasing compression above 25 often results in a severe performance degradation of the PNG encoder, thought with png8 I've observed less of it. Doing the same with JPEG results in a degradation in image quality, did not measure performance but it seemed similar by the naked eye.


2

Have you tried it sucessfully with a handfull of files? For me, it worked with 300 files. At first, I had to build individual vrts for each image to expand the colour information to rgba: for %%N in (D:\Karten\gdal\gdal2tiles\NL25\*.tif) DO gdal_translate -of vrt -expand rgba %%N D:\Karten\gdal\gdal2tiles\NL25\%%~nN.vrt Second run, I merged all those ...


2

Well, on my own, I finally dug out the key function I needed: setSubsetString(). Whoever named this thing?...doesn't seem very intuitive as to its function. Here's the skeleton I'm working with now: qgis.utils.iface canvas = qgis.utils.iface.mapCanvas() allLayers = canvas.layers() for n in range(1, 201) for layer in allLayers: ...


2

This looks like a perfect use-case for GeoServer. I guess Mapserver would also fit you needs. I've personally build something similar to make a printable version of an OpenLayers powered map. This map was displaying complex data coming from GeoServer on top of Google base maps (WMS protocl was used between OL and GeoServer). What I did was simply to ...


2

Sounds to me like MapFish Print will do exactly what you want. We use it to do exactly this from a web mapping application.


2

you can do that with the help of MASK and r.resample (make a copy of your raster before) This video would guide you : http://www.youtube.com/watch?v=0tfcyxRvEJ8


2

Yes, just do a search cursor to get the specific field/record value and update layout default title text (you set this within a template map document), see sample code below. import arcpy # run search cursor here mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd") for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"): if elm.text == ...


2

The good people at Boundless have built on top of the well known Silk icon set to make a set of GIS specific icons called GeoSilk. You can download them from the SVN repository.


2

You can also try the GIS icon library by Robert Szczepanek: http://robert.szczepanek.pl/icons.php


2

If you don't know the extent in coordinates of the prj file, you have to georeference the file manually using ground control points. This is rather comfortable if you have QGIS installed, and you can guess some details from the image. In some cases, you can build the extent manually if the filename follows a certain rule, like the one-degree-SRTM files do. ...


2

Arcmap has the ability to save with transparent colour for those image formats that support a transparent colour: GIF and PNG, of these two the PNG (Portable Network Graphic) is the better format as it supports 24bit colour and transparency where GIF only has 8bit palette colour and transparency. To make the export transparent select in the export dialog ...


1

I've used imagemagick's mogrify command to fix transparency for GoogleEarth, but my source images came from other software. mogrify -type TrueColorMatte -background "black" -transparent black file.png These options may also help -format png32 -depth 8 -type TruecolorMatte -define png:color-type=6



Only top voted, non community-wiki answers of a minimum length are eligible