dicing/slicing an svg document

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

dicing/slicing an svg document

chandrashekar srinivasan



Hi SVGians

 
I have a requirement wherein I need to show only a small part of a huge svg document (6MB uncompressed size) at a  time on JSVGCanvas. for example I have a svg file loaded with the entire streets directory for the whole of US and I want to show only for WA state.Is there any way I can do this without loading the whole document and setting the view box to some small area. The thing here is it takes a lot of time to build the tree and i guess setting the viewbox to a desired area is not going to prevent creation of the GVT tree.
 
Thanks for all your help.
 
Chandra
--------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: dicing/slicing an svg document

thomas.deweese
Hi Chandra,

    This is the purpose of the multi image element from
SVG 1.2.  Batik has a fairly complete implementation of this.
It does require you to 'pre slice' your source data.  The
basic idea is that you can break your one large SVG into many
smaller 'tiles'.  Then only the tiles that are needed for
a particular rendering will actually be fetched and rendered.

    The multi-image element also includes support for making
this multi-resolution so when you are zoomed out to view the
entire US you get a separate file from when you are zoomed in
all the way (as you probably don't want to show all the street's
and street names in the overview map).

    There are a number of examples in samples/tests/spec12/structure.

chandra srinivasan wrote:

> I have a requirement wherein I need to show only a small part of a huge
> svg document (6MB uncompressed size) at a  time on JSVGCanvas. for
> example I have a svg file loaded with the entire streets directory for
> the whole of US and I want to show only for WA state.Is there any way I
> can do this without loading the whole document and setting the view box
> to some small area. The thing here is it takes a lot of time to build
> the tree and i guess setting the viewbox to a desired area is not going
> to prevent creation of the GVT tree.
>  
> Thanks for all your help.
>  
> Chandra
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: [hidden email] For
> additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: dicing/slicing an svg document

Benjamin Campin
In reply to this post by chandrashekar srinivasan

Hello Chandra,

 

Concerning the slicing, Adobe Illustrator is able to slice an svg document.

Using dynamic loading: getUrl, ParseXML, you could have a level of zoom were you could load some piece of svg when needed.

 

 

Benjamin

 


From: chandra srinivasan [mailto:[hidden email]]
Sent: May 16, 2005 6:22 PM
To: [hidden email]
Subject: dicing/slicing an svg document

 

 

Hi SVGians

 

I have a requirement wherein I need to show only a small part of a huge svg document (6MB uncompressed size) at a  time on JSVGCanvas. for example I have a svg file loaded with the entire streets directory for the whole of US and I want to show only for WA state.Is there any way I can do this without loading the whole document and setting the view box to some small area. The thing here is it takes a lot of time to build the tree and i guess setting the viewbox to a desired area is not going to prevent creation of the GVT tree.

 

Thanks for all your help.

 

Chandra

--------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email]