Saturday, September 26, 2009

Tweaking OpenLayers WFS requests to work with featureid

OpenLayers (at least as of 2.8) WFS requests always include the bbox, but that doesn't work if you specify a featureid (the two are defined as mutually exclusive).  Here's a quick work-around for this problem using apache's mod_rewrite.

I'm using apache as an AJP proxy in front of geoserver, but there's no reason this wouldn't work with other WFS servers like mapserver, etc. Put this in the appropriate config file:

RewriteEngine On

RewriteCond %{QUERY_STRING} featureid=[^&]+ [NC]
RewriteCond %{QUERY_STRING} (.*)bbox=[^&]+(.*) [NC]
RewriteRule (.*)  $1?%1%2 [P,L]

ProxyPass /geoserver/ ajp://localhost:8009/geoserver/

1 comment:

  1. It differs from drilling in that the milling machine cutter is able to|is prepared to} move within a number of} axes, permitting it to create extensive range|a variety} of holes, slots and shapes. CNC milling machines are very versatile and enable the manufacturing of complicated shapes that would be nearly inconceivable to create using handbook tooling. The CNC process entails using computer-aided design and computer-aided manufacturing programs written in proprietary code known as G-Code and M-Code. These programs control features like raw materials feed fee, piece positioning, and Oversized Sweater chopping velocity.