[mapguide-users] selectAggregate error

Rodolfo Moreno rmoreno at voxiva.com
Wed Oct 29 20:08:10 EDT 2008


I am describing an issue, because the theming is not working well. 
Moog thinks that it is an mapguide issue as well. This is a fragment of the
email that he sent me (he gave  me permission to post it):
----------------------
Hi Rodolfo,
i have the same problem but only with individual distribution(for linked
layers). Numerical works fine for both kind of layers (linked and not
linked). However, i think the problem is in the way the data is linked. is
the relationship set to one to one? my thematics used to fail when i use one
to many relationship. then i make it one to one and get the individual
distribution problem, fixed by the code ( not smoothly enough but it shows
me all features ) . this might be a mapguide bug or we are doing something
wrong lol
----------------------

I have tested with different formats: unmanaged, managed shapes, managed sdf
and unmanaged sql 2008 feature sources. As well I have tested in different
viewers: Fusion and Ajax viewer. In all the cases the theming is wrong.

Could it be registered as an issue?



zspitzer wrote:
> 
> here the task about adding support ordering
> http://trac.osgeo.org/mapguide/ticket/618
> 
> can you create a MGP ?
> 
> On Wed, Oct 29, 2008 at 10:22 AM, ralph2008 <rmoreno at voxiva.net> wrote:
> 
>>
>> Hi Moog,
>> I have tried your code and it fixes partially the error.
>> The code avoids that the error to be raised, however the theming is not
>> done
>> suitably. I don't know whether it happens to you, but in my case the code
>> is
>> not theming the first feature of a layer.
>> I have a featureSource(SHP unmanaged) with 5 features:
>> featId=1
>> featId=2
>> featId=3
>> featId=4
>> featId=5
>> The Id order is created by mapguide studio (I guess).
>> Then when this layer is themed only the features 2,3,4 and 5 are
>> displayed.
>> It happens only with linked layers for either individual or numerical
>> distribution.
>>
>> I think that is an issue of mapguide, at least 2.0.1 since it's the
>> version
>> that I have.
>>
>> Regards
>>
>>
>> Rodolfo Moreno wrote:
>> >
>> >
>> > Yeah, that's rigth, I have gotten this error with linked layer (layer
>> with
>> > join to a database)
>> > I have received your new post in my email (with your code), but even it
>> > has
>> > not been posted in the forum, odd. I will try it.
>> > Thank very much Moog.
>> >
>> >
>> > Moog wrote:
>> >>
>> >>
>> >> hi, of course. i'm at college now i will send u the code when i arrive
>> >> home.
>> >> btw, my code its just a quicky way to solve this problem. i dont know
>> if
>> >> it's smooth enough. however it helps, i guess. did you get the error
>> in
>> a
>> >> linked layer? i only got that error when i was linking my layer with a
>> >> database.
>> >>
>> >> regards
>> >>
>> >>
>> >> Rodolfo Moreno wrote:
>> >>>
>> >>>
>> >>> Hi Moog I got the same error in .NET.
>> >>> I did what Mauricio suggested (put the selectDistinct statement
>> before
>> >>> that
>> >>> Addfeatureproperty ), but the same error is raised.
>> >>> Could share you share your solution, please.
>> >>>
>> >>> thanks in advance
>> >>>
>> >>>
>> >>>
>> >>> Moog wrote:
>> >>>>
>> >>>>
>> >>>> that's right. i fixed it making my own algorithm, but it want to
>> know
>> >>>> why
>> >>>> i
>> >>>> got that error. thanks
>> >>>>
>> >>>>
>> >>>> Mauricio Villablanca wrote:
>> >>>>>
>> >>>>>
>> >>>>> Your variable $aggregateOptions is a MgFeatureAggregateOptions
>> object
>> >>>>> and
>> >>>>> your featureService variable is a MgFeatureService object, right?
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> Moog wrote:
>> >>>>>>
>> >>>>>>
>> >>>>>> hello,
>> >>>>>> i need some help. Do you know why i get the following error in
>> this
>> >>>>>> line?
>> >>>>>>
>> >>>>>> $dataReader = $featureService->SelectAggregate($resId,
>> >>>>>> $layer->GetFeatureClassName(), $aggregateOptions);
>> >>>>>>
>> >>>>>> where, $aggregateOptions is
>> >>>>>>
>> $aggregateOptions->AddFeatureProperty($this->args['PROPERTYNAME']);
>> >>>>>> $aggregateOptions->SelectDistinct(true);
>> >>>>>>
>> >>>>>> Index is out of range. Exception occurred in method GetItem at
>> line
>> >>>>>> 81
>> >>>>>> in
>> >>>>>> file
>> >>>>>>
>> d:\buildforgeprojects\carrera_nightly\build_32.2\ent\os\common\foundation\System/DisposableCollection.cpp
>> >>>>>> Index is out of range.
>> >>>>>> - MgFeatureServiceHandler.ProcessOperation line 83 file
>> >>>>>>
>> d:\buildforgeprojects\carrera_nightly\build_32.2\ent\os\server\src\services\feature\FeatureServiceHandler.cpp
>> >>>>>> - MgOpSelectFeaturesSpatial.Execute line 110 file
>> >>>>>>
>> d:\buildforgeprojects\carrera_nightly\build_32.2\ent\os\server\src\services\feature\OpSelectFeaturesSpatial.cpp
>> >>>>>> - MgServerSelectFeatures.SelectFeatures line 249 file
>> >>>>>>
>> d:\buildforgeprojects\carrera_nightly\build_32.2\ent\os\server\src\services\feature\ServerSelectFeatures.cpp
>> >>>>>> - GetItem line 81 file
>> >>>>>>
>> d:\buildforgeprojects\carrera_nightly\build_32.2\ent\os\common\foundation\System/DisposableCollection.cpp
>> >>>>>>
>> >>>>>> thanks ;)
>> >>>>>>
>> >>>>>> --
>> >>>>>> View this message in context:
>> >>>>>>
>> http://www.nabble.com/selectAggregate-error-tp19690193p19690193.html
>> >>>>>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>> >>>>>>
>> >>>>>> _______________________________________________
>> >>>>>> mapguide-users mailing list
>> >>>>>> mapguide-users at lists.osgeo.org
>> >>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>> --
>> >>>>> View this message in context:
>> >>>>> http://n2.nabble.com/selectAggregate-error-tp1121116p1299635.html
>> >>>>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>> >>>>>
>> >>>>> _______________________________________________
>> >>>>> mapguide-users mailing list
>> >>>>> mapguide-users at lists.osgeo.org
>> >>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> >>>>>
>> >>>>>
>> >>>>
>> >>>> --
>> >>>> View this message in context:
>> >>>> http://www.nabble.com/selectAggregate-error-tp19690193p19838822.html
>> >>>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>> >>>>
>> >>>> _______________________________________________
>> >>>> mapguide-users mailing list
>> >>>> mapguide-users at lists.osgeo.org
>> >>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>> -----
>> >>> Rodolfo Moreno
>> >>> CivilEng
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>> http://n2.nabble.com/selectAggregate-error-tp1121116p1384640.html
>> >>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>> >>>
>> >>> _______________________________________________
>> >>> mapguide-users mailing list
>> >>> mapguide-users at lists.osgeo.org
>> >>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> >>>
>> >>>
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/selectAggregate-error-tp19690193p20198179.html
>> >> Sent from the MapGuide Users mailing list archive at Nabble.com.
>> >>
>> >> _______________________________________________
>> >> mapguide-users mailing list
>> >> mapguide-users at lists.osgeo.org
>> >> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> >>
>> >>
>> >
>> >
>> > -----
>> > Rodolfo Moreno
>> > CivilEng
>> >
>> > --
>> > View this message in context:
>> > http://n2.nabble.com/selectAggregate-error-tp1121116p1387543.html
>> > Sent from the MapGuide Users mailing list archive at Nabble.com.
>> >
>> > _______________________________________________
>> > mapguide-users mailing list
>> > mapguide-users at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/mapguide-users
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/selectAggregate-error-tp19690193p20218082.html
>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
> 
> 
> 
> -- 
> Zac Spitzer -
> http://zacster.blogspot.com (My Blog)
> +61 405 847 168
> 
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 


-----
Rodolfo Moreno
CivilEng

-- 
View this message in context: http://n2.nabble.com/selectAggregate-error-tp1121116p1396090.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list