Fwd: [OpenMap Users] Opnema 5.0 to slow

From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Wed, 24 Jul 2013 10:35:56 -0400

I wanted to post this to explain the changes to ShapeLayer. Performance
can be greatly improved by using straight linetypes for Shape files. You'd
want to make sure that the shape file's polygons points are close enough
together to hide the difference, though.

I think you can set the line type programmatically by setting a
GraphicAttributes object instead of a DrawingAttributes object on the
ShapeLayer. GraphicAttributes extends DrawingAttributes and lets you set
some OMGraphic-y settings other than color/stroke/fill.

You can also retrieve the EsriGraphicFactory from the SpatialIndex object
in ShapeLayer, and set the LineType on that factory object.

- Don

---------- Forwarded message ----------
From: Don Dietrick <dfdietrick_at_gmail.com>
Date: Wed, Jul 24, 2013 at 10:19 AM
Subject: Re: [OpenMap Users] Opnema 5.0 to slow
To: Frank Conover <frank.conover_at_gmail.com>


Hi Frank,

That is an excellent point, I forgot that change was made.

OpenMap supports three line types. LINETYPE_STRAIGHT, which draws lines on
the map between two pixels. LINETYPE_GREATCIRCLE lines are drawn as the
shortest path on a sphere between the two points, and LINETYPE_RHUMB draws
lines of constant bearing between points. You can see these lines in
action if you look at the Graticule layer in the Orthographic projection.

GreatCircle lines are the lines between the north and south poles. Those
vertical lines right under the center of the projection are straight, but
the lines off to the side are curved. They still represent the shortest
path from the north pole through the equator to the south pole.
'Straight' lines would be drawn as if with a ruler laid on top of the
computer screen., so technically they don't have geospatial meaning. For
polygons/lines where the points are further apart, it starts to make a
difference if GREATCIRCLE or STRAIGHT lines are chosen.

Rhumb lines are the horizontal lines - they are at a specific latitude, but
have a constant bearing due east (or west).

If the points in a shape file are close enough together, straight lines are
fine between them, because the differences between the lines drawn between
the points are too small to notice. Computationally, though, it's a big
difference.

So, we made the change to be technically correct, but for some files
straight lines would be fine and would perform much bettter.

Thanks for pointing that out,

Don


On Tue, Jul 23, 2013 at 7:59 PM, Frank Conover <frank.conover_at_gmail.com>wrote:

> Hi, i ran into this same problem, i don't have the code in front of me but
> I tracked it to:
> EsriGraphicList.getEsriGraphicList now sets LineType to GreatCircle were
> before there was a different method that defaulted to Straight or didn't
> set it.
> I copied the method and tested setting it set to Straight and we are now
> able to migrate to OpenMap 5 as we still use shapefiles and were having
> really bad performance and memory issues.
>
> I don't understand the difference in line types. Maybe you could point me
> to the difference.
>
> Thanks for a great product over the years!
>
> Frank
>
> >
> > -----Original Message-----
> > From: Don Dietrick [mailto:dfdietrick_at_gmail.com <dfdietrick_at_gmail.com>]
> > Sent: Friday, May 17, 2013 11:25 AM
> > To: EOsorio_at_sisdef.cl
> > Cc: openmap-users_at_bbn.com
> > Subject: Re: [OpenMap Users] Opnema 5.0 to slow
> >
> > Hi Eliecer,
> >
> > OpenMap 5 is going to use more memory because it's storing coordinates
> with double precision instead of floats. If you are running out of memory
> you might want to increase your java heap size, starting your application
> with the -Xmx---m flag, where --- is the number of Mb you want the heap to
> have.
> >
> > If that doesn't fix your speed problems, too, let me know.
> >
> > - Don
> >
> > On May 17, 2013, at 10:20 AM, EOsorio_at_sisdef.cl wrote:
> >
> >> Hi, my name is Eliecer.
> >>
> >> Years ago I developed a applicataion with Openmap 4.0. This application
> works fine.
> >> But, I recompile this application with Openmap 5.o and I have a lot of
> problems.
> >>
> >> The same maps (shapefiles) gemerate Memory overflow.
> >> I put few maps and my application is very slow.
> >>
> >> What is my fail??
> >>
> >> Thanks in advance...
> >
>
> Sent from my iPhone
>


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Jul 24 2013 - 10:39:33 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT