mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-16 21:01:10 +08:00
Update docs #631
This commit is contained in:
parent
9806ded8bc
commit
fce24f41a1
@ -10,6 +10,8 @@
|
||||
|
||||
<para>The <ulink url="http://www.geolatte.org/">geolatte</ulink> project is used for the object model.</para>
|
||||
|
||||
<imagedata fileref="media/spatial.svg" scalefit="1" width="90%"/>
|
||||
|
||||
<sect2>
|
||||
<title>Maven integration</title>
|
||||
|
||||
@ -115,6 +117,9 @@
|
||||
Geometry point = Wkt.fromWkt("Point(2 2)");
|
||||
query.where(table.geo.distance(point).lt(5.0));
|
||||
]]></programlisting>
|
||||
|
||||
<para>In addition to straight distance between geometries spherical and spherodial distance are provided via
|
||||
distanceSphere and distanceSpheroid.</para>
|
||||
|
||||
</sect3>
|
||||
|
||||
@ -135,7 +140,21 @@ query.where(table.geo.contains(point));
|
||||
|
||||
<programlisting language="java"><![CDATA[
|
||||
Geometry geo = query.uniqueResult(table.geo1.intersection(table.geo2));
|
||||
]]></programlisting>
|
||||
]]></programlisting>
|
||||
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
|
||||
<title>Access to the SPATIAL_REF_SYS table</title>
|
||||
|
||||
<para>Unified access to the SPATIAL_REF_SYS standard table is provided via the QSpatialRefSys
|
||||
and SpatialRefSys classes. SPATIAL_REF_SYS contains data about the supported spatial reference systems.</para>
|
||||
|
||||
<programlisting language="java"><![CDATA[
|
||||
QSpatialRefSys spatialRefSys = QSpatialRefSys.spatialRefSys;
|
||||
List<SpatialRefSys> referenceSystems = query.from(spatialRefSys).list(spatialRefSys);
|
||||
]]></programlisting>
|
||||
|
||||
</sect3>
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.3 KiB |
BIN
querydsl-docs/src/main/docbook/media/spatial.png
Normal file
BIN
querydsl-docs/src/main/docbook/media/spatial.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
1
querydsl-docs/src/main/docbook/media/spatial.svg
Normal file
1
querydsl-docs/src/main/docbook/media/spatial.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 164 KiB |
Loading…
Reference in New Issue
Block a user