QUERYMAPFEATURES and requestdata = 3 throws NpE

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

QUERYMAPFEATURES and requestdata = 3 throws NpE

mjirku
Hello,
I am trying to use function QUERYMAPFEATURES in http request with following attributes:

USERNAME:Anonymous
VERSION:2.6.0
OPERATION:QUERYMAPFEATURES
CLIENTAGENT:Ba map
SESSION:7f380636-f1a3-11e3-8000-000c29a84b46_en_MTI3LjAuMC4x0AFC0AFB0AFA
MAPNAME:Bratislava_WGS84
GEOMETRY:POINT(1911201.731377 6132057.4546509)
SELECTIONVARIANT:INTERSECTS
MAXFEATURES:-1
LAYERATTRIBUTEFILTER:2
FORMAT:application/json
PERSIST:1
REQUESTDATA:3

But I am getting MgNullReferenceException in response. It says: "Null reference. No data from renderer." plus stack trace:
- MgRenderingServiceHandler.ProcessOperation() line 83 file c:\working\build_area\mapguide\2.6.0\x64\mgdev\server\src\services\rendering\RenderingServiceHandler.cpp
- MgOpRenderDynamicOverlay.Execute() line 162 file c:\working\build_area\mapguide\2.6.0\x64\mgdev\server\src\services\rendering\OpRenderDynamicOverlay.cpp
- MgServerRenderingService.RenderDynamicOverlay() line 412 file c:\working\build_area\mapguide\2.6.0\x64\mgdev\server\src\services\rendering\ServerRenderingService.cpp
- MgServerRenderingService.CreateImage() line 2041 file c:\working\build_area\mapguide\2.6.0\x64\mgdev\server\src\services\rendering\ServerRenderingService.cpp

It is working with REQUESTDATA = 1, but it does not output bounds, I need those.
Do you see obvious mistake I am doing, or what can be the problem.

The source of information about this feature is located here: http://trac.osgeo.org/mapguide/wiki/MapGuideRfc126

Thanks a lot for your answers.
MJ
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

mjirku
Does anybody has suggestions on this one? I am really desperate.
I am using MapGuide 2.6.
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

Jackie Ng
In reply to this post by mjirku
Without some sample data to test that request against, there isn't much we can do.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

mjirku
Thanks for the reply.
I probably found the problem finally now, after few hours of investigation :)

The data I am using, are here: http://gis-services.sk:8009/mg/mapviewerajax/?WEBLAYOUT=Library://Bratislava/Bratislava_WGS84.WebLayout

And I compared it with data in original coordinating system
http://gis-services.sk:8009/mg/mapviewerajax/?WEBLAYOUT=Library://Bratislava/Bratislava.WebLayout
(you should zoom a little bit, because at this scale everything is invisible, username is common mapguide username)

However the problem seems to be in converting coordinate systems. Original data are in JTSK and the http request QUERYMAPFEATURES  outputs the bounds without any problem. When data are converted in mapdefinition into WGS84 pseudmerc., it does not send me bounds.
Is this normal mapguide behavior? Do you see how I can resolve this issue?
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

amorsell
This post was updated on .
I bet this is related to the same problem I'm seeing where Fusion is returning null extents for a selection object only when the map is defined in WGS84 PseudoMercator.

http://osgeo-org.1560.x6.nabble.com/Fusion-2-6-AIMS-2015-ZoomToSelection-Problem-td5145845.html
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

Jackie Ng
In reply to this post by mjirku
Is your QUERYMAPFEATURES request from custom code?

It appears that none of the viewers will ever issue a QUERYMAPFEATURES with a point geometry. Even "point" selections are "inflated" to a tiny box before the QUERYMAPFEATURES request is made.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

Flipper
In reply to this post by mjirku

Convert to real world units..it is unit less in Lat Long and psuedo..you can't zoom into a point which is infinite..maybe I missing something

On Jun 16, 2014 2:12 PM, "mjirku" <[hidden email]> wrote:
Thanks for the reply.
I probably found the problem finally now, after few hours of investigation
:)

The data I am using, are here:
http://gis-services.sk:8009/mg/mapviewerajax/?WEBLAYOUT=Library://Bratislava/Bratislava_WGS84.WebLayout

And I compared it with data in original coordinating system
http://gis-services.sk:8009/mg/mapviewerajax/?WEBLAYOUT=Library://Bratislava/Bratislava.WebLayout
(you should zoom a little bit, because at this scale everything is
invisible, username is common mapguide username)

However the problem seems to be in converting coordinate systems. Original
data are in JTSK and the http request QUERYMAPFEATURES  outputs the bounds
without any problem. When data are converted in mapdefinition into WGS84
pseudmerc., it does not send me bounds.
Is this normal mapguide behavior? Do you see how I can resolve this issue?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/QUERYMAPFEATURES-and-requestdata-3-throws-NpE-tp5145379p5146150.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

Flipper

Is it buffer by a percentage or a real world unit..and if a real world unit like meter or foot is it defined correctly?

On Jun 16, 2014 10:18 PM, "Scott Hameister" <[hidden email]> wrote:

Convert to real world units..it is unit less in Lat Long and psuedo..you can't zoom into a point which is infinite..maybe I missing something

On Jun 16, 2014 2:12 PM, "mjirku" <[hidden email]> wrote:
Thanks for the reply.
I probably found the problem finally now, after few hours of investigation
:)

The data I am using, are here:
http://gis-services.sk:8009/mg/mapviewerajax/?WEBLAYOUT=Library://Bratislava/Bratislava_WGS84.WebLayout

And I compared it with data in original coordinating system
http://gis-services.sk:8009/mg/mapviewerajax/?WEBLAYOUT=Library://Bratislava/Bratislava.WebLayout
(you should zoom a little bit, because at this scale everything is
invisible, username is common mapguide username)

However the problem seems to be in converting coordinate systems. Original
data are in JTSK and the http request QUERYMAPFEATURES  outputs the bounds
without any problem. When data are converted in mapdefinition into WGS84
pseudmerc., it does not send me bounds.
Is this normal mapguide behavior? Do you see how I can resolve this issue?



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/QUERYMAPFEATURES-and-requestdata-3-throws-NpE-tp5145379p5146150.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

mjirku
In reply to this post by Jackie Ng
Hi Jackie,
Yes, It is custom client side application. It is easy to create a tiny polygon. But selection seems to work fine with this point as well. Issue I encounter is valid even I used tiny polygon. :(

But are there other reasons I should change my code to use tiny polygons with QUERYMAPFEATURES?
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

mjirku
In reply to this post by Flipper
Hi Flipper,
I am little bit confused, what do you mean by real world unit?
Original data in database (MS SQL) are in JTSK.
Working mapdefinition (mapdefinition which returns bounds) uses:
PROJCS["CzechJTSK/5.Krovak",GEOGCS["CzechJTSK/5.LL",DATUM["CzechJTSK/5",SPHEROID["BESSEL",6377397.155,299.15281535]],PRIMEM["Ferro", -17.6666666666667],UNIT["Degree",0.017453292519943295]],PROJECTION["Krovak"],PARAMETER["longitude_of_center",42.50000000000000],PARAMETER["latitude_of_center",49.50000000000000],PARAMETER["azimuth",30.28813975989891],PARAMETER["pseudo_standard_parallel_1",78.50000000000000],PARAMETER["false_easting",0.000],PARAMETER["false_northing",0.000],PARAMETER["scale_factor",0.999900000000],UNIT["Meter",1.00000000000000]]

While I need for my custom client side application WGS84 pseud., I am using in mapdefinition coordinate system defined as:
PROJCS["WGS84.PseudoMercator",GEOGCS["LL84",DATUM["WGS84",SPHEROID["WGS84",6378137.000,298.25722293]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Popular Visualisation Pseudo Mercator"],PARAMETER["false_easting",0.000],PARAMETER["false_northing",0.000],PARAMETER["central_meridian",0.00000000000000],UNIT["Meter",1.00000000000000]]

Should I change something to make it work?
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

Jackie Ng
In reply to this post by mjirku
Ok, I think it's because you failed to specify SELECTIONFORMAT.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: QUERYMAPFEATURES and requestdata = 3 throws NpE

Flipper
In reply to this post by mjirku
Really Sorry...I misread the Problem...I thought you were trying to select
a point feature and Zoom out by a percentage (which doesn't work)...also
in a Lat/Long Psuedomercator even adding units instead of percent is hard
becuase a single unit can be a large Area.
S+I thought that is what you were accidently doing..Sorry for the
confusion


Scott Hameister | www.mpowerinnovations.com
________________________________________
mPower Innovations
Director of Product Development
1051 N Lynndale Drive, Suite 2A, Appleton, WI 54914
T: 920-830-4053 ext. 204 | F: 920-955-4057
TF: 877-269-6971 ext. 204 | C: 920-419-6250

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of mjirku
Sent: Monday, June 16, 2014 11:01 PM
To: [hidden email]
Subject: Re: [mapguide-users] QUERYMAPFEATURES and requestdata = 3 throws
NpE

Hi Flipper,
I am little bit confused, what do you mean by real world unit?
Original data in database (MS SQL) are in JTSK.
Working mapdefinition (mapdefinition which returns bounds) uses:
PROJCS["CzechJTSK/5.Krovak",GEOGCS["CzechJTSK/5.LL",DATUM["CzechJTSK/5",SP
HEROID["BESSEL",6377397.155,299.15281535]],PRIMEM["Ferro",
-17.6666666666667],UNIT["Degree",0.017453292519943295]],PROJECTION["Krovak
"],PARAMETER["longitude_of_center",42.50000000000000],PARAMETER["latitude_
of_center",49.50000000000000],PARAMETER["azimuth",30.28813975989891],PARAM
ETER["pseudo_standard_parallel_1",78.50000000000000],PARAMETER["false_east
ing",0.000],PARAMETER["false_northing",0.000],PARAMETER["scale_factor",0.9
99900000000],UNIT["Meter",1.00000000000000]]

While I need for my custom client side application WGS84 pseud., I am
using in mapdefinition coordinate system defined as:
PROJCS["WGS84.PseudoMercator",GEOGCS["LL84",DATUM["WGS84",SPHEROID["WGS84"
,6378137.000,298.25722293]],PRIMEM["Greenwich",0],UNIT["Degree",0.01745329
2519943295]],PROJECTION["Popular
Visualisation Pseudo
Mercator"],PARAMETER["false_easting",0.000],PARAMETER["false_northing",0.0
00],PARAMETER["central_meridian",0.00000000000000],UNIT["Meter",1.00000000
000000]]

Should I change something to make it work?



--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/QUERYMAPFEATURES-and-requestdata-3-thr
ows-NpE-tp5145379p5146205.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users