Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there a way to draw a postgres geometry in a pdf file using a php script? Thank you.

share|improve this question
add comment

3 Answers

Commercial solution is use FME to export data to 3d PDF, this one supports vector data.

share|improve this answer
add comment

I guess you can execute Gdal and ImageMagick from any language.

gdal_rasterize -b 1 -i -burn -9999 PG:'host=localhost dbname='unep''
               -sql "SELECT ST_buffer(the_geom, .12) 
                     from coastlines where name='Poland'" Poland_elev.tif



ImageMagick will convert a tiff to a pdf.

share|improve this answer
add comment

I use a php framework (CodeIgniter) in my apps which has a pdf library plugin to create the pdf document. Then I generate a url that calls my Mapserver WMS to get a map image of the appropriate size, features and use that url as an image tag (like: img src="url" ) in the pdf doc. It's a rather complicated solution, but it shows that it can be done and works well now.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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