What are the appropriate formats for the http://schema.org/GeoShape properties?

It would be nice if the GeoShape page included examples or individual properties were broken instead of just being text.

I'm interested in the property of the circle. I want to define a circle with a radius of 20 miles (~ 32 km) from the center of Nottingham (52.953, -1.149).

<!DOCTYPE html> <html> <head> <title>Nottingham City Neighbourhood</title> </head> <body> <div itemscope itemtype="http://schema.org/Place"> <div itemprop="geo" itemscope itemtype="http://schema.org/GeoShape"> <meta itemprop="circle" content="52.953 -1.149 32186.88"/> </div> </div> </body> </html> 

The rich fragment tool displays data, but I do not believe that I used the correct format. Moreover, strong longitude is positive.

 > The following structured data is viewable only in the XML results view > in Custom Search. More information. > > geoshape (source = MICRODATA) circle = 52.953 -1.149 32186.88 > > > The following structured data can be used to filter search results in > Custom Search. More information. > > more:pagemap:geoshape more:pagemap:geoshape-circle > more:pagemap:geoshape-circle:1.149 > more:pagemap:geoshape-circle:32186.88 > more:pagemap:geoshape-circle:52.953 > more:pagemap:geoshape-circle:52.953_ 

As for the rest, I think that both fields and the polygon will be in the format "$ lat1, $ long1 $ lat2, $ long2 $ lat3, $ long3 $ lat1, $ long1" for the square.

Does anyone have a definitive answer or reason?

+6
source share
3 answers

I did some archeology, following a similar path to others.

Details: http://lists.w3.org/Archives/Public/public-vocabs/2012Jun/0116.html

It seems that the confusion of the recipe (as Yves Martin points out) misses the gaps in the original rNews examples.

We will improve this situation, and I will report here.

+3
source

Validation

The example you give (in the first version of your question) does not pass the check at http://validator.nu/ . You cannot directly use a property in the same node that declares the entity type. The rich fragment tool is probably not rigorous enough. To confirm this, the alternative tool also refuses to generate a JSON expression from your block due to the absence of a top-level element.

Therefore, an additional node is required for the geo property, here is the correct way to express it (doctype and title are for the verification tool only):

 <!DOCTYPE html> <title>Nottingham City Neighbourhood</title> <div class="hidden" itemscope itemtype="http://schema.org/GeoShape"> <div itemprop="geo"> <meta itemprop="circle" content="52.953 -1.149 32186.88"/> </div> </div> 

Recommendation

According to this Google FAQ, only a few objects are truly supported and based on Organization and Event in microdata format, the optional geo property offers only longitude and latitude elements from http://schema.org/GeoCoordinates . Therefore, there is less doubt about using this simple point definition compared to circle . By the way, this example is valid and correctly extracted:

 <div itemscope itemtype="http://data-vocabulary.org/Organization"> <span itemprop="name">Nottingham City Neighbourhood</span> <div itemprop="geo"> <meta itemprop="circle" content="52.953 -1.149 32186.88"/> </div> </div> 

If you use sindice.com , there is no bang for http://schema.org/GeoShape , whereas http://schema.org/GeoCoordinates widely used. It is not so easy to find the real use of circle in the real world.

Circle property value

For the contents of the circle property itself, many documents relate to WGS84 , but this only applies to the point. This documentation confirms the structure of the text content for the circle element.

This example for rNews clearly does not have a place in front of the radius 500 and does not display properly, the page source contains <td class="rnews_td codestyle">38.920952 -94.645443500</td> instead of <td class="rnews_td codestyle">38.920952 -94.645443 500</td>

You should look at circuit generators or parsers . Perhaps one of them implemented a small grain editor for GeoShape properties instead of a raw text field so that you can confirm the structure of the content content. I looked at Any23 , but still the same question: GeoCoordinates is implemented, but not GeoShape.

Field and Polygon Property Value

There is no expectation of a coma between longitude and latitude for a point, field, polygon or line (use only space) according to rNews and GeoRSS .

In conclusion, you should avoid GeoShape if your goal is to provide a location for search engines ... At the moment, only GeoCoordinates seems like a smart choice.

+3
source

Transitioning from the W3.org discussion , the approximate value of the GeoShape Box would be:

 38.920952 -94.645443 38.951797 -94.680439 

These values ​​display the area here .

As indicated in the schema , they just have to be unique values ​​for the box angles (for example, "latmin latmax lonmin lonmax"):

A polygon is an area enclosed by a point-to-point path for which the start and end points are the same. A polygon is expressed as a series of four or more points with a parallel distribution, where the first and final points are identical.

0
source

Source: https://habr.com/ru/post/914028/


All Articles