Changes

Check coordinates distance and bearing 6.0

1,960 bytes added, 13:50, 9 October 2016
Created page with "This queries are for database that has been upgraded to 6.0 and during upgrade process distance and bearing was '''not''' fixed. ==Case 1 Coordinates migrated from Legacy wit..."
This queries are for database that has been upgraded to 6.0 and during upgrade process distance and bearing was '''not''' fixed.

==Case 1 Coordinates migrated from Legacy with Distance and bearing as extra information==__NOEDITSECTION__
This worked well with 5.x but especially xml export/import does not work well with 6.0. Extra information refers to that the points are defined as an absolute point plus has distance and bearing information but does '''not''' have FromPointGUID.

This case has to be fixed in two steps:
# point 1 of the polygon is referring to a single point i.e. not to any point that is part of the polygon
# point 1 of the polygon is the absolute point

=== Case 1A===__NOEDITSECTION__
Run this query (''DistBear Missing FromPoint Point1'') to check if you have any points that falls under Case 1A
<pre>
SELECT
"public".geopoint.geopoint_guid,
"public".geopoint.longitude,
"public".geopoint.latitude,
"public".geopoint.bearing,
"public".geopoint.distance,
"public".geopoint.frompoint_guid,
"public".geopoint.user_entered_x,
"public".geopoint.user_entered_y,
"public".geopoint.coordrefsys,
"public".geopoint.userinputformat,
"public".geopoint.coordformat,
poly.enumvalue
FROM
"public".geopoint
INNER JOIN "public".geospatialinfo ON "public".geospatialinfo.geospatialinfo_guid = "public".geopoint.geospatialinfo_guid
INNER JOIN "public".imsmaenum AS poly ON "public".geospatialinfo.shapeenum_guid = poly.imsmaenum_guid
WHERE
("public".geopoint.distance IS NOT NULL AND
"public".geopoint.bearing IS NOT NULL) AND
("public".geopoint.frompoint_guid IS NULL OR length("public".geopoint.frompoint_guid) = 0 )AND
"public".geopoint.user_entered_x IS NOT NULL AND
"public".geopoint.user_entered_y IS NOT NULL AND
"public".geopoint.pointno = 1 AND
poly.enumvalue LIKE 'Poly%'
ORDER BY
"public".geopoint.geospatialinfo_guid ASC,
"public".geopoint.pointno ASC
</pre>

{{NavBox Hub}}
[[Category:NoPublic]]
[[Category:SQL Queries]]
[[Category:NAA]]
6,632
edits