Hi
I want to create a feature with a WKT
My map and my layers are in meters (Proj 2154)
BaseShape vehShape = BaseShape.CreateShapeFromWellKnownData("POLYGON((0 0,4.8 0,4.8 1.8,0 1.8,0 0))");
The size of my shape is 48 m X 18 m ??
I test
BaseShape vehShape = BaseShape.CreateShapeFromWellKnownData("POLYGON((0 0,48 0,48 18,0 18,0 0))");
The size is Ok
The WKT description has a problem with the float values ?
Thanks
WKT (Android V 9.0.93.0)
Hi Maumet,
If your unit equal meter, that should meant 4.8 m x 1.8m I think. Because the WKT don’t contains unit, you can assign it manual.
Regards,
Don
Hi Don
In my first sample, I try with
POLYGON((0 0,4.8 0,4.8 1.8,0 1.8,0 0)
And the size of the object are 48X18, not 4.8 X 1.8
Regards
Laurent M
Hi Don
Another try
("POLYGON((0 0,4.85 0,4.85 1.85,0 1.85,0 0))"
The size of the object is 485 X 185 ???
The point decimal is forget
Regards
Laurent M
Hi Laurent,
Could you please let me know how you calculate the size?
I want to reproduce that first.
Regards,
Don
Hi Don
I add the objet in a layer,
BaseShape vehShape = BaseShape.CreateShapeFromWellKnownData("POLYGON((0 0,4.8 0,4.8 1.8,0 1.8,0 0))");
var r = androidMap.CurrentExtent;
var p = r.GetCenterPoint();
vehShape.TranslateByOffset(p.X, p.Y);
mylayer.Open();
mylayer.FeatureSource.BeginTransaction();
var f=new Feature(vehShape);
f.ColumnValues.Add("IdUnique", c.IdUnique);
f.ColumnValues.Add("label", "");
mylayer.FeatureSource.AddFeature(f);
mylayer.FeatureSource.CommitTransaction();
mylayer.Close()
In debug mode, I read the coordinates of the object.
And the object drew, it is not at the good size.
Thanks
Laurent M
Hi Laurent,
It looks your code create the polygon near the equator then move it to current extent.
And it looks not good shape, then you read the coordinates for the new shape in current extent and found the width & height is 48 and 18 for your test polygon "POLYGON((0 0,4.8 0,4.8 1.8,0 1.8,0 0))", right?
I will let our Android developer knows this bug, try to reproduce and solve it, if I misunderstand that please let me know.
Regards,
Don
Hi Don
Yes, it is the problem.
Thanks
Laurent M
Hi Laurent,
Thanks for make sure this, our Android team will back this Thursday, they will try to reproduce that first and go on working for it if is proved a bug.
Please waiting for our update.
Regards,
Don
Hi Maumet,
Sorry to say we didn’t recreate your issue, would you mind to provide us your sample or take a video to show your issue? Here is a good tool for recording video: techsmith.com/jing.html
Btw, I found the codes you were using TranslateByOffset method, but looks like you pass coordinates into it, maybe you should use the TranslateByDegree instead.
Thanks,
Troy
Hi
Hi
A important precision.
My Windows is a french Windows. The decimal separator are a comma.
I try this code
I create a region feature and
var wkt = feature.GetWellKnownText();
var f=new Feature(wkt);
wkt is ok with decimal point
f is not ok, all decimal point are disappear.
I join a screen copy
Thanks
Laurent M
Hi Maumet,
It looks your problem should be for Android, but you mentioned about windows calculate today, so what’s the platform your issue on now?
Regards,
Don
Hi Don
French Windows 8.1
Xamarin Studio 5.9.7
Xamarin Android 5.1.7
Target Android Version 4.2(Api level 17)
Thanks
Laurent M
Hi Maumet,
Today we tested the problem in French language environment, the screenshot are as follows:
The value of vehF is true.
That meants, we still cannot reproduce your issue here.
Our developers suggest, could you please try to use our other product to test whether you can reproduce that only on machine, if you can reproduce that for example in Desktop edition, that meant it’s not an Android issue but an environment issue.
Regards,
Don
Hi
I try
On my computer (always the same)
BaseShape vehShape = BaseShape.CreateShapeFromWellKnownData("POLYGON((0 0,4.8 0,4.8 1.8,0 1.8,0 0))");
var vehBB = vehShape.GetBoundingBox();
Feature vehf = new Feature(vehBB);
The tablet (Sony Experia Z2)
Android in french
vehf => {POLYGONE((0 0,48 0,48 18,0 18,0 0))}
Android in english
vehf => {POLYGONE((0 0,4.8 0,4.8 1.8,0 1.8,0 0))}
In french, there are many error about the decimal point
with event vertex
.TrackOverlay.VertexAdded, the coordinates are false.
I join a screen copy
The problem is about the language of the tablet.
I tried mapsuite desktop with french windows: no problem for decimals.
Thank
Laurent M
Hi Laurent,
Thanks for let us know, after set French for tablet we have reproduced that, but our developer need more time to find the reason and try to fix it.
Regards,
Don
Thanks, I am waiting.
Hi Maumet,
Thanks very much for your waiting.
We have fixed this bug, it will be included after “9.0.122.0”, please get the latest version and try again.
Thanks,
Hi Don
9.0.127.0 it is OK
Thanks
Laurent M
Hi Laurent,
I am glad to hear that works.
Regards,
Don