[mapguide-users] can anyone solved this buffer problem

padmini godavarthi godavarthi.padmini at gmail.com
Thu Apr 30 04:13:40 EDT 2009


Hi Kenneth,

  i have created a buffer with 0.2 miles but i think the buffer is not
creating accurately 

     http://n2.nabble.com/file/n2745746/buffer.jpeg 

1) can u provide any solution?????????????

2)And can u plz tell me the code for retrieving parcel_id with in the buffer
area(im a little bit confused)

plzzzzzzzz

Regards,
Padmini.


Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> It looks correct to me. Try using a smaller buffer to better determine 
> accuracy.
> 
> For the second question, you have already asked that in another thread.
> The AJAX viewer shows selection data, so try looking at the 
> selection.aspx files,
> and see how it works.
> 
> Regards, Kenneth Skovhede, GEOGRAF A/S
> 
> 
> 
> padmini godavarthi skrev:
>> Hi  Kenneth,
>> Thanku very much for ur help.............
>> i did the coordinate system override as per ur instructions.
>> It works fine
>> but i felt that the buffer feature is not coming accurately??
>> what was the problem????????????????????????????
>>
>> i mean by observing closely  its not an accurate circle(buffer layer).
>>
>> http://n2.nabble.com/file/n2683455/pic.jpeg 
>>
>> 2)secondly i want to retrieve the parcel_ids that are included or
>> intersected in the buffer layer.How  is it possible ? can u send me the
>> sample code?????????
>>
>> Thanks in advance.
>>
>> Regards,
>> Padmini.
>>
>>
>>
>>
>>
>>
>>
>>
>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>   
>>> Thats because the Sheboygan data uses a true georeferenced coordinate 
>>> system,
>>> and your data is using a non-georeferenced system, like XY-M.
>>> Arbitrary should be understood as "non-georeferenced".
>>>
>>> If your data is not in the same projection as the map, you cannot use 
>>> the buffer feature.
>>>
>>> This then returns to my initial statement: "Coordinate System Override", 
>>> which can
>>> set the data coordinate system to match the maps.
>>>
>>> Can you please report what happened with with the suggestions I made,
>>> regarding the coordinate system overrides?
>>>
>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>
>>>
>>>
>>> padmini godavarthi skrev:
>>>     
>>>> Hi,
>>>>
>>>> In my data
>>>>
>>>>     bool arbitraryMapSrs = (srsMap.GetType() ==
>>>> MgCoordinateSystemType.Arbitrary);
>>>>
>>>> arbitraryMapSrs comes as true but in sheboygan data it comes as false
>>>>
>>>>         if (arbitraryMapSrs)
>>>>             mapSrsUnits = srsMap.GetUnits();
>>>> In mydata mapSrsUnits comes as "meter" but in sheboygan data it comes
>>>> as
>>>> null
>>>>
>>>> so that   
>>>>  if ((arbitraryDsSrs != arbitraryMapSrs) || (arbitraryDsSrs &&
>>>> (dsSrsUnits
>>>> != mapSrsUnits)))
>>>>             {
>>>>                 excludedLayers++;
>>>>                 continue;
>>>>             }
>>>> In my data  excludedLayers comes as 1 and where as in sheboyan data
>>>> this
>>>> condition fails....................
>>>> Can u plz provide me the solution?????????????
>>>>
>>>> Regards,
>>>> Padmini.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>>>   
>>>>       
>>>>> Why do you mention packages?
>>>>>
>>>>> excludedLayers is incremented because the data coordinate system is
>>>>> not 
>>>>> the same as the map coodinate system.
>>>>>
>>>>> Please comment on what happend when you attempted my previous
>>>>> suggestions.
>>>>>
>>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>>
>>>>>
>>>>>
>>>>> padmini godavarthi skrev:
>>>>>     
>>>>>         
>>>>>> Hi Kenneth,
>>>>>> Thanks for ur suggestions.
>>>>>> I have created a package using OGR provider but in the buffering i
>>>>>> found
>>>>>> some problem that
>>>>>>
>>>>>>      // exclude layer if:
>>>>>>             //  the map is non-arbitrary and the layer is arbitrary
>>>>>> or
>>>>>> vice-versa
>>>>>>             //     or
>>>>>>             //  layer and map are both arbitrary but have different
>>>>>> units
>>>>>>             //
>>>>>>             if ((arbitraryDsSrs != arbitraryMapSrs) ||
>>>>>> (arbitraryDsSrs
>>>>>> &&
>>>>>> (dsSrsUnits != mapSrsUnits)))
>>>>>>             {
>>>>>>                 excludedLayers++;
>>>>>>                 continue;
>>>>>>             }
>>>>>> it gives difference to my data and sheboygan sample data
>>>>>> so that in my code  excludedLayers is incremented to 1 so i didnt get
>>>>>> the
>>>>>> buffer features
>>>>>> can u plz tell me the solution?????????????????
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>> Padmini.
>>>>>>
>>>>>>  
>>>>>>
>>>>>>
>>>>>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> I'm not sure that provider is case insensitive.
>>>>>>> Try adding the file again, but with the name "PROPERTIES.shp".
>>>>>>>
>>>>>>> Also, try creating a folder, and place the files in the folder.
>>>>>>> Then try to use the "External files" and point to the folder.
>>>>>>> Also try pointing directly to the file.
>>>>>>>
>>>>>>> When the "Test connection" is successfull, try clicking the
>>>>>>> rightmost button in the "coordinate system override" field, and
>>>>>>> it will show you what the provider returns as the coordinate system.
>>>>>>>
>>>>>>> Alternatively, try using the OGR provider instead of the SHP
>>>>>>> provider.
>>>>>>>
>>>>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> padmini godavarthi skrev:
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>>> Hi Keneneth,
>>>>>>>> First of all thanks for ur patience 
>>>>>>>> i have uploaded all the files but i didnt get the coordinate system
>>>>>>>>
>>>>>>>>     http://n2.nabble.com/file/n2676400/file.jpeg 
>>>>>>>>
>>>>>>>> again i did anything wrong??????????
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Padmini.
>>>>>>>>
>>>>>>>>
>>>>>>>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>>>>>>>   
>>>>>>>>       
>>>>>>>>           
>>>>>>>>               
>>>>>>>>> IIRC Shape files consist of more than just the SHP file.
>>>>>>>>> You must upload all the "Properties.*" files to the datasource,
>>>>>>>>> even if the upload file dialog is misleading (you must select "All 
>>>>>>>>> files" to see them).
>>>>>>>>>
>>>>>>>>> A ticket for this problem is here.
>>>>>>>>> http://trac.osgeo.org/mapguide/ticket/783
>>>>>>>>>
>>>>>>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> padmini godavarthi skrev:
>>>>>>>>>     
>>>>>>>>>         
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>>>> Hi,
>>>>>>>>>> but i did it as per ur instruction but it didn't come 
>>>>>>>>>>
>>>>>>>>>> http://n2.nabble.com/file/n2676097/over.jpeg 
>>>>>>>>>>
>>>>>>>>>> my code as same as previous
>>>>>>>>>>  MgResourceIdentifier featSourceId = new
>>>>>>>>>> MgResourceIdentifier(selLayer.GetFeatureSourceId());
>>>>>>>>>>             MgSpatialContextReader ctxs =
>>>>>>>>>> featureSrvc.GetSpatialContexts(featSourceId, false);
>>>>>>>>>>             String srsDefDs = "";
>>>>>>>>>>             if (ctxs != null && ctxs.ReadNext())
>>>>>>>>>>       srsDefDs = ctxs.GetCoordinateSystemWkt();
>>>>>>>>>>
>>>>>>>>>> in  srsDefDs i got null
>>>>>>>>>> does i did any thing wrong
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Padmini.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>>>>>>>>>   
>>>>>>>>>>       
>>>>>>>>>>           
>>>>>>>>>>               
>>>>>>>>>>                   
>>>>>>>>>>> Yes, your FeatureSource reports an empty coordinate system, so
>>>>>>>>>>> you
>>>>>>>>>>> have 
>>>>>>>>>>> to specify it manually.
>>>>>>>>>>>
>>>>>>>>>>> There is a short explanation on how to use overrides here:
>>>>>>>>>>> http://trac.osgeo.org/fdo/wiki/FdoGdalNotes#OverridingCoordinateSystems
>>>>>>>>>>>
>>>>>>>>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> padmini godavarthi skrev:
>>>>>>>>>>>     
>>>>>>>>>>>         
>>>>>>>>>>>             
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>>> Hi,
>>>>>>>>>>>> thanks but is it necessary overriding a coordinate
>>>>>>>>>>>> system????????
>>>>>>>>>>>> How it willbe done???????
>>>>>>>>>>>> can u provide me some guidance???????
>>>>>>>>>>>> i have seen ur link but no data available in that for overrides
>>>>>>>>>>>> coordinate
>>>>>>>>>>>> system
>>>>>>>>>>>>
>>>>>>>>>>>> http://trac.osgeo.org/mapguide/wiki/maestro/UserGuides/RasterFeatureSource
>>>>>>>>>>>>
>>>>>>>>>>>> can u plz tell me????????????
>>>>>>>>>>>>
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> Padmini.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>>>>>>>>>>>   
>>>>>>>>>>>>       
>>>>>>>>>>>>           
>>>>>>>>>>>>               
>>>>>>>>>>>>                   
>>>>>>>>>>>>                       
>>>>>>>>>>>>> No, I meant "Coordinate System Override", which is located on
>>>>>>>>>>>>> the 
>>>>>>>>>>>>> FeatureSource editor at the bottom.
>>>>>>>>>>>>> See screenshots here:
>>>>>>>>>>>>> http://trac.osgeo.org/mapguide/wiki/maestro/UserGuides/RasterFeatureSource
>>>>>>>>>>>>>
>>>>>>>>>>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> padmini godavarthi skrev:
>>>>>>>>>>>>>     
>>>>>>>>>>>>>         
>>>>>>>>>>>>>             
>>>>>>>>>>>>>                 
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>> Thanks for ur reply 
>>>>>>>>>>>>>> u man to say in mapdefinition(in maestro)????????????????
>>>>>>>>>>>>>> iam using maestro and i have selected  the coordinate system
>>>>>>>>>>>>>> as  
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> http://n2.nabble.com/file/n2675676/coor.jpeg 
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> does i did any thing wrong???????????????
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>>> Padmini.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>>>>>>>>>>>>>   
>>>>>>>>>>>>>>       
>>>>>>>>>>>>>>           
>>>>>>>>>>>>>>               
>>>>>>>>>>>>>>                   
>>>>>>>>>>>>>>                       
>>>>>>>>>>>>>>                           
>>>>>>>>>>>>>>> Have you tried to add a coordinate system override,
>>>>>>>>>>>>>>> using Maestro or Studio?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> padmini godavarthi skrev:
>>>>>>>>>>>>>>>     
>>>>>>>>>>>>>>>         
>>>>>>>>>>>>>>>             
>>>>>>>>>>>>>>>                 
>>>>>>>>>>>>>>>                     
>>>>>>>>>>>>>>>                         
>>>>>>>>>>>>>>>                             
>>>>>>>>>>>>>>>>  Hi,
>>>>>>>>>>>>>>>> iam using mapguide opensource 2.0 (with .net 2.0 +IIS 5.1)
>>>>>>>>>>>>>>>> i want to make a buffer to my data
>>>>>>>>>>>>>>>> the buffer function works fine for this sheboygan data but
>>>>>>>>>>>>>>>> not
>>>>>>>>>>>>>>>> for
>>>>>>>>>>>>>>>> my
>>>>>>>>>>>>>>>> data
>>>>>>>>>>>>>>>> i have debugged the application and i got the error at
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>     MgResourceIdentifier featSourceId = new
>>>>>>>>>>>>>>>> MgResourceIdentifier(selLayer.GetFeatureSourceId());
>>>>>>>>>>>>>>>>             MgSpatialContextReader ctxs =
>>>>>>>>>>>>>>>> featureSrvc.GetSpatialContexts(featSourceId, false);
>>>>>>>>>>>>>>>>             String srsDefDs = "";
>>>>>>>>>>>>>>>>             if (ctxs != null && ctxs.ReadNext())
>>>>>>>>>>>>>>>>       srsDefDs = ctxs.GetCoordinateSystemWkt();
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> In Sheboygan data  
>>>>>>>>>>>>>>>> srsDefDs comes as  GEOGCS["WGS84 Lat/Long's, Degrees, -180
>>>>>>>>>>>>>>>> ==>
>>>>>>>>>>>>>>>> +180",DATUM["D_WGS_1984",SPHEROID["World_Geodetic_System_of_1984",6378137,298.257222932867]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> but for my data
>>>>>>>>>>>>>>>>   srsDefDs comes as null 
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Actually my data is in coordinate system 
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
>>>>>>>>>>>>>>>> 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> can u plz tell me the solution????????????????????????
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> plzzz
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Regards,
>>>>>>>>>>>>>>>> Padmini.
>>>>>>>>>>>>>>>>   
>>>>>>>>>>>>>>>>   
>>>>>>>>>>>>>>>>       
>>>>>>>>>>>>>>>>           
>>>>>>>>>>>>>>>>               
>>>>>>>>>>>>>>>>                   
>>>>>>>>>>>>>>>>                       
>>>>>>>>>>>>>>>>                           
>>>>>>>>>>>>>>>>                               
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> mapguide-users mailing list
>>>>>>>>>>>>>>> mapguide-users at lists.osgeo.org
>>>>>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     
>>>>>>>>>>>>>>>         
>>>>>>>>>>>>>>>             
>>>>>>>>>>>>>>>                 
>>>>>>>>>>>>>>>                     
>>>>>>>>>>>>>>>                         
>>>>>>>>>>>>>>>                             
>>>>>>>>>>>>>>   
>>>>>>>>>>>>>>       
>>>>>>>>>>>>>>           
>>>>>>>>>>>>>>               
>>>>>>>>>>>>>>                   
>>>>>>>>>>>>>>                       
>>>>>>>>>>>>>>                           
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> mapguide-users mailing list
>>>>>>>>>>>>> mapguide-users at lists.osgeo.org
>>>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>     
>>>>>>>>>>>>>         
>>>>>>>>>>>>>             
>>>>>>>>>>>>>                 
>>>>>>>>>>>>>                     
>>>>>>>>>>>>>                         
>>>>>>>>>>>>   
>>>>>>>>>>>>       
>>>>>>>>>>>>           
>>>>>>>>>>>>               
>>>>>>>>>>>>                   
>>>>>>>>>>>>                       
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> mapguide-users mailing list
>>>>>>>>>>> mapguide-users at lists.osgeo.org
>>>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>     
>>>>>>>>>>>         
>>>>>>>>>>>             
>>>>>>>>>>>                 
>>>>>>>>>>>                     
>>>>>>>>>>   
>>>>>>>>>>       
>>>>>>>>>>           
>>>>>>>>>>               
>>>>>>>>>>                   
>>>>>>>>> _______________________________________________
>>>>>>>>> mapguide-users mailing list
>>>>>>>>> mapguide-users at lists.osgeo.org
>>>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>     
>>>>>>>>>         
>>>>>>>>>             
>>>>>>>>>                 
>>>>>>>>   
>>>>>>>>       
>>>>>>>>           
>>>>>>>>               
>>>>>>> _______________________________________________
>>>>>>> mapguide-users mailing list
>>>>>>> mapguide-users at lists.osgeo.org
>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>>>>
>>>>>>>
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> _______________________________________________
>>>>> mapguide-users mailing list
>>>>> mapguide-users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>>>
>>>>>
>>>>>     
>>>>>         
>>>>   
>>>>       
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>
>>>
>>>     
>>
>>   
> 
> _______________________________________________
> 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/can-anyone-solved-this-buffer-problem-tp2675600p2745746.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list