|
Posted by M.Barren on August 6, 2006, 3:57 pm
Please log in for more thread options
Hi,
I'm in the process of making a gps navigation software (this is for a
specific reason, i know there are lots of them already out there),
having very little knowledge about vector based rendering where only
the objects (lines, polygons, etc.) that are visible inside the frame
are supposed to be drawn. I did come up with some ideas but they are
way too slow to be of any practical use. I'd appreciate if someone can
help me with finding some information about it.
Thanks in advance.
|
|
Posted by tomkralidis on August 6, 2006, 11:52 pm
Please log in for more thread options
M.Barren@gmail.com wrote:
> Hi,
>
> I'm in the process of making a gps navigation software (this is for a
> specific reason, i know there are lots of them already out there),
> having very little knowledge about vector based rendering where only
> the objects (lines, polygons, etc.) that are visible inside the frame
> are supposed to be drawn. I did come up with some ideas but they are
> way too slow to be of any practical use. I'd appreciate if someone can
> help me with finding some information about it.
>
> Thanks in advance.
Depends on how you want to render your data. If you want the actual
features to be interactive, you'll want to look at Scaleable Vector
Graphics (SVG -- http://www.w3.org/Graphics/SVG/). If you want to
create map images of your features, you'll want to look into packages
which does exactly this.
My recommendation would be to take a look at MapServer
(http://mapserver.gis.umn.edu/), which can output both SVG and map
images. You'll need some middleware to turn the GPS data into
something MapServer can read (supports a multitude of vector [and
raster] formats). Whether you want to do this offline via cron job or
on the fly (both are possible) depends on your requirements.
As you mention, there are tons of packages which can already do this
for you. If you really want to do this by hand, check out cairo, or
batik, or GD, as basic graphic rendering libraries.
|
|
Posted by M.Barren on August 7, 2006, 4:33 pm
Please log in for more thread options
tomkralidis wrote:
> As you mention, there are tons of packages which can already do this
> for you. If you really want to do this by hand, check out cairo, or
> batik, or GD, as basic graphic rendering libraries.
I use c#, hence GDI+. But having around 500,000 lines in one map, I
need to emply some technique to avoid drawing lines outside the view
frame.
I don't know where to start, a good starting point will be very much
appreciated.
|
|
Posted by tomkralidis on August 7, 2006, 6:43 pm
Please log in for more thread options
M.Barren@gmail.com wrote:
> tomkralidis wrote:
>
> > As you mention, there are tons of packages which can already do this
> > for you. If you really want to do this by hand, check out cairo, or
> > batik, or GD, as basic graphic rendering libraries.
>
> I use c#, hence GDI+. But having around 500,000 lines in one map, I
> need to emply some technique to avoid drawing lines outside the view
> frame.
> I don't know where to start, a good starting point will be very much
> appreciated.
Why don't you use the MapServer C# mapscript API? There's intelligence
in MapServer to do clipping, tiling, etc., which you can access from
the API.
If you want to do this by hand (why?), you'll want to take a look at
the MapServer source code, for example.
|
|
Posted by suraj.joneja on August 11, 2006, 3:15 am
Please log in for more thread options Hi,
If you decide to anyway write your own code to render spatial data
(point, polylines, polygons) etc.there are 2 aspects to it:
1) Only load the data that is visible currently visible to the user in
memory (not advisable to load all 50,000 lines in memory); to enable
this 'spatial selectivity' you will need to use some sort of spatial
indexing, which enables you load in memory only the visible portion
from your 'spatial database'. Simple techniques to organize your data
in Grids of space then load only those grids which intersect with your
viewport can be used.
2) Only render that portion of this already selectively loaded data
which falls in the user's viewport. For this you have for clipping
algorithms for line and polygons.
However, I think it would be much wiser to use an existing library for
this, as already mentioned.
HTH,
Suraj
M.Barren@gmail.com wrote:
> tomkralidis wrote:
>
> > As you mention, there are tons of packages which can already do this
> > for you. If you really want to do this by hand, check out cairo, or
> > batik, or GD, as basic graphic rendering libraries.
>
> I use c#, hence GDI+. But having around 500,000 lines in one map, I
> need to emply some technique to avoid drawing lines outside the view
> frame.
> I don't know where to start, a good starting point will be very much
> appreciated.
|
|