GeoServer的WFS空间查询

在网上搜了很久,没有找到靠谱的代码,于是参考各种资料终于测试出其格式


点查询:

http://***:8060/geoserver/**/ows?service=WFS&request=GetFeature&version=1.0.0
    &typeName=图层服务名称&maxFeatures=2000&outputFormat=json&filter=
    
        
            GEOM
            
                113.8037,34.43554
            
        
    
线查询:
http://***:8060/geoserver/**/ows?service=WFS&request=GetFeature&version=1.0.0
    &typeName=图层服务名称&maxFeatures=2000&outputFormat=json&filter=
    
        
            GEOM
            
		113.763,34.435 113.763,34.5 113.844,34.5 113.844,34.435
            
        
    
面查询:
http://***:8060/geoserver/**/ows?service=WFS&request=GetFeature&version=1.0.0
	&typeName=图层服务名称&maxFeatures=2000&outputFormat=json&filter=
	
	GEOM
		        
		    
			 	113.763,34.435 113.763,34.5 113.763,34.435
			
		
	

这里如果需要进行属性查询,可添加属性查询条件:

 var url = *** +'geoserver/**/ows?' 
            + 'service=WFS&request=GetFeature&version=1.0.0&typeName=图层服务名称&maxFeatures=1&outputFormat=json'
		+ '&FILTER=' 
		+ ''
		+ 'ST_NAME' + stName + ''
		+ 'NAME' + setloc + '' 
		+ ''
		+ '';
 
  


你可能感兴趣的:(GeoServer)