|
From: Sanket C. P. <san...@cs...> - 2008-12-22 18:44:23
|
Hi Justin, I guess the data that we integrate from different sources is used for rendering and querying purpose (I'm new to this project and not much sure how user of this tool render or make query on data :) ). The tool makes use of ontologies for inter-operability between web feature sources. YOu can find more info at http://www.cse.iitb.ac.in/FIGO/tool/. The solution that you told to merge the two GML file will work. I'm yet to write the code for that. One more thing, I want a large test data to test the performance of the my parallel fetch application . Where I can get such data? Thanks, Sanket Patle. > Sanket Chandulal Patle wrote: >> Hi Justin, >> >> Thanks for reply. We want to make use of multiple WFS sources to fetch >> data and reduce the total time for downloading the feature instances. >> (When number of feature instances are in hundreds-thousands.) >> >> My different regions here belongs to different WFS sources so >> >> region 1 (WFS1) : http://10.129.13.8/geoserver/wfs >> region 2 (WFS2) : http://10.112.117.29/geoserver/wfs >> >> So I'll fetch some instances from one WFS and some instances from other. >> I >> don't know how much it will be useful to reduce the total time. But >> still >> a try. > Interesting :). >> >> 1) One thing I would like to know how getFeature within BB works. So >> does >> it returns instances which are completely inside given BB or instances >> which are completely as well as partially inside given BB ? > It will return both features which are entirely contained and partially > contained. You can use the ogc:Contains filter to ensure only those > which are entirely contained are returned. >> >> So in your solution, >> >> <ogc:And> >> <ogc:BBOX> >> <BBOX filter for region 1> >> </ogc:BBOX> >> </ogc:BBOX> >> <BBOX filter for region 2> >> </ogc:BBOX> >> </ogc:And> >> >> This will work only if getfeature also returns instaces which are >> partially inside BB. >> >> If your solution returns the instaces overlapping in both regions, then >> I'll do parallel fetch from 2 WFS as: >> >> First getFeature POST request to WFS1 = Fetch all instances within BB of >> region 1+ Fetch instances overlapping in region 1 and region 2 >> Second getfeature POST request to WFS2 = Fetch all instances within BB >> of >> region 2 >> Merge both results. >> >> >> 2) Also about spatial join of two GML, It's OK even if geoserver doesn't >> provide any support for joining two GML files. I will write code for >> spatial join, but I'm not getting any idea about how to proceed for it. >> Couldn't get much information on web :(. > Yeah, it is sort of tricky. The only way i can think of to do it would be: > > 1. Download the 2 / 3 wfs requests to xml files > 2. Create a third file to merge them > 3. Write the wfs:FeatureCollection element to the merged file > 4. Parse (using SAX) each of the individual files pulling out wach > "gml:featureMember" element, and write that to the merged file. > 5. Close the wfs:FeatureCollection element > > A very brute force approach, and not the most efficient. What will be > done with the end result of the features from the wfs? Will they be > rendered? Or will you actually have to deliver them somewhere in gml? >> >> Thanks, >> Sanket Patle. >> >>> Hi Sanket, >>> >>> Responses inline. Out of curiosity what are the motivations for setting >>> up such a scheme? >>> >>> Sanket Chandulal Patle wrote: >>>> Hi, >>>> >>>> I've set up 3 geoserver WFS. Each containing same feature data. I want >>>> to >>>> fetch data from all 3 sources at the same time. So I'm partitioning >>>> data >>>> based on bouding box. So if (minx,miny) and (maxx,maxy) are bounding >>>> box >>>> coordinates, I'm doing horizontal partitioning of bouding box in 3 >>>> regions >>>> as >>>> >>>> Interval = (maxy-miny) / 3. >>>> Region 1 BB: (minx,miny) , (maxx, miny+ Interval) >>>> Region 2 BB: (minx,miny+Interval), (maxx, miny+2*Interval) >>>> Region 3 BB: (minx,miny+2*Interval), (maxx,miny+3*interval) >>>> >>>> Horizontal partition like this >>>> >>>> >>>> |-------------------------------| >>>> | | >>>> | Region 1 | >>>> | | >>>> |-------------------------------| >>>> | | >>>> | Region 2 | >>>> | | >>>> |-------------------------------| >>>> | | >>>> | Region 3 | >>>> | | >>>> |-------------------------------| >>>> >>>> Problems that I'm facing >>>> >>>> 1) I'm using get feature request within particular bounding box to >>>> fetch >>>> data from each region. But there are some features whose geometry >>>> overlaps >>>> with both regions. So they are not included in getfeature requests of >>>> any >>>> of the region. (Since they are not within bounding box of any region) >>>> > >>>> Can anyone tell me how can I fetch such instances which overlaps with >>>> more >>>> than one region? >>> THere is probably more than one way to do this, but could you just And >>> two of the filters together. Something like: >>> >>> <ogc:And> >>> <ogc:BBOX> >>> <BBOX filter for region 1> >>> </ogc:BBOX> >>> </ogc:BBOX> >>> <BBOX filter for region 2> >>> </ogc:BBOX> >>> </ogc:And> >>> >>> If you wanted to all three regions in one query you would wrap them in >>> an Or like: >>> >>> <ogc:Or> >>> >>> </ogc:Or> >>> <ogc:And> >>> <AND fitler for regions 1 and 2> >>> </ogc:And> >>> </ogc:And> >>> <AND fitler for regions 2 and 3> >>> </ogc:And> >>> </ogc:And> >>> >>> >>>> 2) I get response to each of the getfeature request as some GML data. >>>> Can >>>> I perform spatial join on this GML data to merge the results? Is yes, >>>> then >>>> how it can be done? >>> Unfortunately not, geoserver does not really support joins in this >>> manner. I can't think of an easy way to do this either. >>>> Thanks, >>>> Sanket Patle. >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >>>> Nevada. >>>> The future of the web can't happen without you. Join us at MIX09 to >>>> help >>>> pave the way to the Next Web now. Learn more and register at >>>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >>>> _______________________________________________ >>>> Geoserver-users mailing list >>>> Geo...@li... >>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >>> >>> -- >>> Justin Deoliveira >>> OpenGeo - http://opengeo.org >>> Enterprise support for open source geospatial. >>> >> > > > -- > Justin Deoliveira > OpenGeo - http://opengeo.org > Enterprise support for open source geospatial. > |