missioncommand / mil-sym-java

(RETIRED) MIL-STD-2525 B and C rendering library and web service
Apache License 2.0
67 stars 36 forks source link

Excessive geometry points for GUMPOWU---****X #96

Open mg629 opened 5 years ago

mg629 commented 5 years ago

When I send the following wire symbol request to mil-sym with the two control points below, I get back 162 elements in the coordinates array.
I am curious if this is correct or if I am not sending data in the url correctly?

D=WIRE1 DESCRIPTION=GUMPOWU---X SYMBOLID=GUMPOWU---X CONTROLPOINTS=[[-93.09246,31.0807],[-93.08921,31,0809]] PIXELWIDTH=1024 PIXELHEIGTH=1024 BBOX=[[-93.0924, 31.08079],[-93.08921,31.0809]] MODIFIERS="T":"WIRE1","T2":"WIRE1" FORMAT=2 SYMSTD=1

With 5000 wire symbols requested, with 162 elements (two coordinates per element) per wire symbol my viewer crashes.

michael-spinelli commented 5 years ago

Was this a typo when you created the issue (comma instead of period: 31,0809) or is that the actual value you used? It's possible the renderer just took 31 and ignored the value after the comma. CONTROLPOINTS=[[-93.09246,31.0807],[-93.08921,31,0809]]

I didn't try the Java port yet but I tried JavaScript and got 122 elements (using 31.0809)

Are all 5000 in the visible map space or spread across the globe?

mg629 commented 5 years ago

yes sorry that was a typo, it should be a period. (31.0809)

Are all 5000 in the visible map space or spread across the globe? Yes, all 5000 are in the visible map space.

michael-spinelli commented 5 years ago

Sorry it took me so long to look at this again.

So, the bounding box should typically represent the extent of the visible map area in your map window.
The pixel height/width should represent the size of your map window in pixels. The ratio of these values should be similar as these values are used to help determine scale and are particularly important when drawing symbols that are more than just simple lines.

You have a very thin and wide bounding box compared to a rectangle for your pixel bounds. That could be a factor.

I tried making the bbox more square to match the square pixel bounds and got better results with fewer coordinates: pixelWidth = 800; pixelHeight = 800; bbox = "-93.0924,31.07919,-93.08921,31.08241";

mg629 commented 5 years ago

Thank you, I will give this a try.