Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to GIS. It is very intersting.

I have installed Postgis, insert shapefile, get data in SVG without problem (ST_AsSVG).

Now, I'd like to export the same svg but in pixel to add it on top of an image. Is it possible directly in the SQL query?

(I can parse the SVG in JS or PHP and convert every point...)

Thanks in advance for your help.

share|improve this question
you mean you want to convert it to a raster? Most graphics software can handle that. – lynxlynxlynx Jul 5 '12 at 15:22
Sorry I was not clear, I needed svg to manage interaction in javascript. – Farf Aug 26 '12 at 9:45
Did you consider using the viewBox attribute ?… – user10135 Sep 11 '12 at 14:14

I'm not sure but if you connect to your database with Qgis, then you'll be able to export it in SVG.

share|improve this answer
I finally manage to do that with st_scale and st_translate. Thanks for your help. – Farf Aug 26 '12 at 9:46
up vote 0 down vote accepted

I finally manage to do that with st_scale and st_translate.

share|improve this answer
Can you say us how did you do that please ? – Geo-x Jan 25 at 16:31

Your Answer


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.