The show stopper for JTS is it's license, unfortunately. Otherwise, I think it would be done already! We could, since it's LGPL, make it an optional dependency, assuming someone can stub it out.
On Feb 8, 2011, at 11:18 PM, Adam Estrada wrote: > I just came across a ~nudge post over in the SIS list on what the status is > for that project. This got me looking more in to spatial mods with Solr4.0. > I found this enhancement in Jira. > https://issues.apache.org/jira/browse/SOLR-2155. In this issue, David > mentions that he's already integrated JTS in to Solr4.0 for querying on > polygons stored as WKT. > > It's relatively easy to get WKT strings in to Solr but does the Field type > exist yet? Is there a patch or something that I can test out? > > Here's how I would do it using GDAL/OGR and the already existing csv update > handler. http://www.gdal.org/ogr/drv_csv.html > > ogr2ogr -f CSV output.csv input.shp -lco GEOMETRY=AS_WKT > This converts a shapefile to a csv with the geometries in tact in the form of > WKT. You can then get the data in to Solr by running the following command. > curl > "http://localhost:8983/solr/update/csv?commit=true&separator=%2C&fieldnames=id,attr1,attr2,attr3,geom&stream.file=C:\tmp\output.csv&overwrite=true&stream.contentType=text/plain;charset=utf-8" > There are lots of flavors of geometries so I suspect that this will be a > daunting task but because JTS recognizes each geometry type it should be > possible to work with them. > Does anyone know of a patch or even when this functionality might be included > in to Solr4.0? I need to query for polygons ;-) > Thanks, > Adam > > > -------------------------- Grant Ingersoll http://www.lucidimagination.com/