Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

arcpy, ExportToSVG using paths

$
0
0

I want to export part of the map into (very big) SVG file. First I tried to do this using REST API:
https://*server*/ArcGIS/rest/services/General/Etages/MapServer/export.
This worked, the SVG file contains <path> tags describing all polygons I have on map and <text> tags describing all the labels. The only problem is that max SVG file size is limited to 4096×4096 pixels.

So I switched to python:

import arcpy

mxd = arcpy.mapping.MapDocument('d:\maps\etages.mxd')
df = arcpy.mapping.ListDataFrames(mxd)[0]
arcpy.mapping.ExportToSVG(mxd, 'd:\maps\etages.svg', df, 256*30, 256*30)
del mxd

I can export bigger maps this way, but the problem is that out SVG file is rendered using <image> tags. Is it possible to force arcpy to export SVG as real polygons/text, not prerendered images?


Viewing all articles
Browse latest Browse all 767

Trending Articles